/* らくらくスマホ風 UIスタイル */

* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #222;
  -webkit-text-size-adjust: 100%;
}

/* 大きいボタンの基本 */
.btn-big {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 80px;
  font-size: 22px;
  font-weight: bold;
  padding: 16px 20px;
  border-radius: 12px;
  border: 3px solid transparent;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  transition: all 0.1s;
  text-align: center;
  cursor: pointer;
  line-height: 1.4;
}

.btn-big:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: #2563eb;
  color: white;
  border-color: #1d4ed8;
}

.btn-success {
  background: #16a34a;
  color: white;
  border-color: #15803d;
}

.btn-warning {
  background: #ea580c;
  color: white;
  border-color: #c2410c;
}

.btn-danger {
  background: #dc2626;
  color: white;
  border-color: #b91c1c;
}

.btn-secondary {
  background: #6b7280;
  color: white;
  border-color: #4b5563;
}

.btn-light {
  background: #ffffff;
  color: #222;
  border-color: #d1d5db;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

/* 大きい入力欄 */
.input-big {
  width: 100%;
  min-height: 60px;
  font-size: 20px;
  padding: 14px 16px;
  border: 3px solid #d1d5db;
  border-radius: 10px;
  background: white;
  color: #222;
}

.input-big:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

textarea.input-big {
  min-height: 120px;
  font-family: inherit;
  resize: vertical;
}

select.input-big {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23222' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 48px;
}

/* ラベル */
.label-big {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #222;
  margin-bottom: 8px;
}

.required-badge {
  display: inline-block;
  background: #dc2626;
  color: white;
  font-size: 14px;
  font-weight: bold;
  padding: 2px 10px;
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.optional-badge {
  display: inline-block;
  background: #9ca3af;
  color: white;
  font-size: 14px;
  font-weight: bold;
  padding: 2px 10px;
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

/* カード */
.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-clickable {
  cursor: pointer;
  transition: all 0.15s;
}

.card-clickable:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.card-clickable:active {
  transform: scale(0.98);
}

/* ヘッダー */
.app-header {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: white;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.app-header h1 {
  font-size: 26px;
  font-weight: bold;
  margin: 0;
}

.app-header .subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin-top: 4px;
}

/* ステータスバッジ */
.status-badge {
  display: inline-block;
  font-size: 16px;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid;
}

.status-受付中 { background: #dbeafe; color: #1e40af; border-color: #1e40af; }
.status-作業中 { background: #fef3c7; color: #92400e; border-color: #92400e; }
.status-完成 { background: #dcfce7; color: #166534; border-color: #166534; }
.status-引渡済 { background: #f3f4f6; color: #4b5563; border-color: #4b5563; }
.status-発送済 { background: #f3e8ff; color: #6b21a8; border-color: #6b21a8; }

/* メッセージ */
.alert {
  padding: 16px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 16px;
  border: 2px solid;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #991b1b;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border-color: #166534;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-color: #1e40af;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-color: #d97706;
}

.alert-warning code {
  background: #fffbeb;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid #fcd34d;
}

/* ローディング */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-box {
  background: white;
  padding: 30px 40px;
  border-radius: 16px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}

.spinner {
  border: 5px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* モーダル */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

.modal-box {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 16px;
  text-align: center;
  color: #1e40af;
}

/* チェックボックス・ラジオ大型化 */
.big-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 3px solid #d1d5db;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
}

.big-check input[type="radio"],
.big-check input[type="checkbox"] {
  width: 28px;
  height: 28px;
  accent-color: #2563eb;
  cursor: pointer;
}

.big-check:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}

/* 戻るボタン */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #222;
  text-decoration: none;
}

/* セクションタイトル */
.section-title {
  font-size: 22px;
  font-weight: bold;
  color: #1e40af;
  padding: 10px 0;
  margin-bottom: 12px;
  border-bottom: 3px solid #1e40af;
}

/* 情報表示 */
.info-row {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.info-label {
  font-size: 15px;
  color: #6b7280;
  font-weight: bold;
}

.info-value {
  font-size: 20px;
  color: #222;
  margin-top: 4px;
  word-break: break-all;
}

/* コンテナ */
.container-narrow {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

/* TOPページ用 グリッドタイル */
.tile-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 12px 32px;
  border-radius: 18px;
  border: 4px solid;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
  min-height: 220px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  color: #222;
}

.tile-card:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
}

.tile-card:hover {
  filter: brightness(1.03);
}

.tile-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 10px;
}

.tile-title {
  font-size: 22px;
  font-weight: bold;
  line-height: 1.25;
  margin-bottom: 8px;
  color: #111;
}

.tile-sub {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.tile-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: 1.5px solid currentColor;
}

.tile-primary  { border-color: #2563eb; background: #eff6ff; }
.tile-primary .tile-title  { color: #1e3a8a; }
.tile-primary .tile-badge  { color: #1e3a8a; }

.tile-success  { border-color: #16a34a; background: #f0fdf4; }
.tile-success .tile-title  { color: #14532d; }
.tile-success .tile-badge  { color: #14532d; }

.tile-warning  { border-color: #ea580c; background: #fff7ed; }
.tile-warning .tile-title  { color: #7c2d12; }
.tile-warning .tile-badge  { color: #7c2d12; }

.tile-secondary { border-color: #6b7280; background: #f9fafb; }
.tile-secondary .tile-title { color: #1f2937; }
.tile-secondary .tile-badge { color: #1f2937; }

.tile-info { border-color: #0891b2; background: #ecfeff; }
.tile-info .tile-title { color: #164e63; }
.tile-info .tile-badge { color: #164e63; }

.tile-purple { border-color: #9333ea; background: #faf5ff; }
.tile-purple .tile-title { color: #581c87; }
.tile-purple .tile-badge { color: #581c87; }

@media (max-width: 360px) {
  .tile-icon { font-size: 44px; }
  .tile-title { font-size: 18px; }
  .tile-card { min-height: 180px; padding: 18px 8px 26px; }
}

