/* ── STEP2: 名前選択 ── */
.names-view { flex-direction: column; }

.names-header {
  padding: 24px 48px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #EFE4CF;
  flex-shrink: 0;
}

.names-back-button {
  padding: 12px 18px;
  border-radius: 14px;
  border: 1.5px solid #EFE4CF;
  background: #fff;
  color: #3B2E20;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.names-step-label {
  font-size: 13px;
  color: #8F8372;
  font-weight: 700;
  letter-spacing: 2px;
}

.names-title {
  font-size: 26px;
  font-weight: 800;
  margin-top: 2px;
}

.names-list {
  flex: 1;
  overflow-y: auto;
  padding: 24px 48px 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-content: start;
}

.name-card {
  background: #FFFFFF;
  border: 1.5px solid #EFE4CF;
  border-radius: 18px;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  font-family: inherit;
  color: #3B2E20;
  min-height: 96px;
  transition: all 0.12s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.name-card:active {
  transform: scale(0.98);
  border-color: #D97757;
}

.name-card-info { flex: 1; min-width: 0; }

.name-card-kanji {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name-card-kana {
  font-size: 12px;
  color: #8F8372;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Avatar */
.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #1C1917;
  flex-shrink: 0;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.08);
}
.name-avatar {
  width: 60px;
  height: 60px;
  font-size: 28px;
}
.modal-avatar {
  width: 88px;
  height: 88px;
  font-size: 42px;
}
.avatar-color-0 { background: #FCA5A5; }
.avatar-color-1 { background: #FCD34D; }
.avatar-color-2 { background: #86EFAC; }
.avatar-color-3 { background: #67E8F9; }
.avatar-color-4 { background: #93C5FD; }
.avatar-color-5 { background: #C4B5FD; }
.avatar-color-6 { background: #F9A8D4; }
.avatar-color-7 { background: #6EE7B7; }
.avatar-color-8 { background: #FDE68A; }
.avatar-color-9 { background: #A5F3FC; }

/* StatusPill */
.status-pill {
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-pill--in { background: #DCFCE7; color: #15803D; }
.status-pill--done { background: #E7E5E4; color: #57534E; }

/* ── 確認モーダル ── */
.confirm-modal {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(59,46,32,0.5);
  align-items: center;
  justify-content: center;
  z-index: 40;
}
.confirm-modal.open {
  display: flex;
  animation: dk-fade-in 0.2s forwards;
}

.confirm-modal-box {
  background: #fff;
  border-radius: 28px;
  padding: 40px;
  width: 720px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  animation: dk-pop-in 0.3s cubic-bezier(.2,1.3,.4,1) forwards;
}

.confirm-user-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.confirm-user-info { flex: 1; }

.confirm-user-kana {
  font-size: 13px;
  color: #8F8372;
  margin-bottom: 4px;
}

.confirm-user-name {
  font-size: 34px;
  font-weight: 800;
}

.confirm-warning {
  display: none;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14px;
  color: #92400E;
  margin-bottom: 20px;
  text-align: center;
}
.confirm-warning.is-visible { display: block; }

.confirm-button-group {
  display: flex;
  gap: 20px;
}

.btn-stamp {
  flex: 1;
  padding: 36px 0;
  border-radius: 20px;
  border: none;
  font-size: 34px;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 8px;
  cursor: pointer;
  transition: transform 0.08s;
}
.btn-stamp:disabled { cursor: not-allowed; }

.stamp-in-button  { background: #16A34A; color: #fff; box-shadow: 0 6px 0 #15803D; }
.stamp-out-button { background: #3B82F6; color: #fff; box-shadow: 0 6px 0 #1D4ED8; }
.stamp-in-button:disabled  { background: #E7E5E4; color: #A8A29E; box-shadow: none; }
.stamp-out-button:disabled { background: #E7E5E4; color: #A8A29E; box-shadow: none; }

.stamp-in-button:not(:disabled):active, .stamp-out-button:not(:disabled):active {
  transform: translateY(4px);
}
.stamp-in-button:not(:disabled) { box-shadow: 0 6px 0 #15803D; }
.stamp-out-button:not(:disabled) { box-shadow: 0 6px 0 #1D4ED8; }

.confirm-cancel-button {
  margin-top: 20px;
  width: 100%;
  padding: 14px 0;
  border-radius: 14px;
  border: 1px solid #EFE4CF;
  background: transparent;
  color: #8F8372;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}

/* ── 完了オーバーレイ ── */
.done-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(30,20,15,0.35);
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.done-overlay.open {
  display: flex;
  animation: dk-fade-in 0.25s ease-out;
}

.done-box {
  background: #fff;
  border-radius: 28px;
  padding: 48px 64px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 480px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  animation: dk-pop-in 0.35s cubic-bezier(.2,1.3,.4,1);
}

.done-badge {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: 800;
}
.done-badge.done-state-queued { background: #FEF3C7; color: #92400E; }
.done-badge.done-state-in { background: #D1FAE5; color: #047857; }
.done-badge.done-state-out { background: #DBEAFE; color: #1D4ED8; }

.done-username {
  font-size: 18px;
  color: #78716C;
  letter-spacing: 0.5px;
}

.done-label {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 2px;
}
.done-label.done-state-queued { color: #92400E; }
.done-label.done-state-in { color: #065F46; }
.done-label.done-state-out { color: #1E3A8A; }

.done-time {
  font-size: 48px;
  font-weight: 300;
  color: #1C1917;
  font-variant-numeric: tabular-nums;
  letter-spacing: 4px;
}

.done-sub {
  font-size: 14px;
  color: #A8A29E;
  margin-top: 8px;
}

/* ── Animations ── */
@keyframes dk-fade-in {
  from { opacity: 0 }
  to   { opacity: 1 }
}
@keyframes dk-pop-in {
  from { opacity: 0; transform: scale(0.92) }
  to   { opacity: 1; transform: scale(1) }
}

@media (max-height: 720px) and (min-width: 701px) {
  .names-header { padding: 12px 24px 9px; }
  .names-back-button { padding: 9px 14px; }
  .names-title { font-size: 22px; }
  .names-list { padding: 12px 24px 16px; gap: 9px; }
  .name-card { min-height: 70px; padding: 9px 13px; }
  .name-avatar { width: 48px; height: 48px; font-size: 23px; }
  .confirm-modal-box { padding: 24px; }
  .confirm-user-row { margin-bottom: 18px; }
  .btn-stamp { padding: 22px 0; }
}

@media (max-width: 700px), (max-width: 900px) and (orientation: portrait) {
  .names-header { padding: 10px 12px; gap: 10px; }
  .names-back-button { padding: 9px 11px; font-size: 13px; }
  .names-step-label { font-size: 10px; }
  .names-title { font-size: 18px; }
  .names-list { padding: 10px 12px 14px; gap: 8px; }
  .name-card { min-height: 72px; padding: 10px; gap: 9px; border-radius: 13px; }
  .name-avatar { width: 46px; height: 46px; font-size: 22px; }
  .name-card-kanji { font-size: 17px; }
  .status-pill { font-size: 10px; padding: 4px 6px; }
  .confirm-modal-box { width: calc(100% - 24px); padding: 20px; border-radius: 20px; }
  .confirm-user-row { gap: 12px; margin-bottom: 18px; }
  .modal-avatar { width: 62px; height: 62px; font-size: 30px; }
  .confirm-user-name { font-size: 24px; }
  .confirm-button-group { gap: 10px; }
  .btn-stamp { padding: 22px 0; font-size: 25px; letter-spacing: 4px; }
  .done-box { min-width: 0; width: calc(100% - 24px); padding: 28px 24px; }
}

@media (max-width: 480px) {
  .names-list { grid-template-columns: 1fr; }
}
