* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  padding: 16px;
}

.container {
  max-width: 480px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  font-size: 1.4rem;
  color: #1a237e;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* 呼び出し中 */
.calling-section {
  background: #1565c0;
  color: #fff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(21,101,192,0.3);
}

.calling-label {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calling-number {
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  margin: 8px 0;
}

.calling-time {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 12px;
  min-height: 1.2em;
}

.calling-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* 操作ボタン */
.actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

/* 統計 */
.stats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-item {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: #888;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #1565c0;
}

/* 待ち一覧 */
.waiting-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.waiting-section h2 {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.waiting-list {
  list-style: none;
}

.waiting-list .empty-msg {
  text-align: center;
  color: #bbb;
  font-size: 0.9rem;
  padding: 16px 0;
}

.waiting-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.waiting-item:last-child {
  border-bottom: none;
}

.item-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1565c0;
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.item-time {
  flex: 1;
  font-size: 0.8rem;
  color: #888;
}

.item-cancel {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: #999;
  cursor: pointer;
  flex-shrink: 0;
}

.item-cancel:hover {
  background: #fde;
  border-color: #f44;
  color: #f44;
}

/* リセット */
.reset-section {
  text-align: center;
}

/* ボタン共通 */
.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-issue {
  flex: 1;
  background: #43a047;
  color: #fff;
}

.btn-issue:hover:not(:disabled) {
  background: #388e3c;
}

.btn-call {
  flex: 1;
  background: #1e88e5;
  color: #fff;
}

.btn-call:hover:not(:disabled) {
  background: #1565c0;
}

.btn-done {
  background: #fff;
  color: #1565c0;
  border: 2px solid rgba(255,255,255,0.6);
  min-width: 90px;
}

.btn-done:hover {
  background: rgba(255,255,255,0.9);
}

.btn-cancel {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  min-width: 90px;
}

.btn-cancel:hover {
  background: rgba(255,255,255,0.25);
}

.btn-reset {
  background: none;
  color: #e57373;
  border: 1px solid #e57373;
  font-size: 0.85rem;
  padding: 8px 20px;
}

.btn-reset:hover {
  background: #ffebee;
}

/* 呼び出し中がない時 */
.calling-section.empty .calling-number {
  opacity: 0.35;
}

.calling-section.empty .calling-actions {
  display: none;
}

@media (max-width: 375px) {
  .calling-number { font-size: 4rem; }
  .stat-value { font-size: 1.3rem; }
}
