:root {
  --brand: #F7931E;
  --brand-dark: #d9780a;
  --text: #333333;
  --black: #000000;
  --line: #e5e5e5;
  --bg: #f7f7f7;
  --danger: #c62828;
  --ok: #2e7d32;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.site-header {
  border-bottom: 3px solid var(--brand);
  background: #fff;
}
.site-header .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: 0.02em;
}
.logo span { color: var(--brand); }
.nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.nav a { color: var(--text); font-weight: 600; font-size: 0.95rem; }

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: #111;
  color: #ddd;
}
.site-footer .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  font-size: 0.9rem;
}
.site-footer a { color: #fff; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

.hero {
  background: linear-gradient(135deg, #fff7eb 0%, #ffffff 55%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--black);
}
.hero p { margin: 0 0 20px; color: #555; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 2px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn-secondary { background: #444; }
.btn-secondary:hover { background: #222; }
.btn-outline {
  background: #fff;
  color: var(--brand-dark);
  border: 2px solid var(--brand);
}
.btn-outline:hover { background: #fff7eb; color: var(--brand-dark); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 6px 10px; font-size: 0.85rem; }

.flash {
  padding: 12px 14px;
  margin-bottom: 16px;
  border-left: 4px solid;
}
.flash-success { background: #e8f5e9; border-color: var(--ok); }
.flash-error { background: #ffebee; border-color: var(--danger); }

.form-section {
  margin: 28px 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.form-section h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  border-left: 4px solid var(--brand);
  padding-left: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.9rem; }
.field input, .field select, .field textarea {
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 10px 12px;
  font: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(247, 147, 30, 0.35);
  border-color: var(--brand);
}
.error-list { color: var(--danger); margin: 0 0 12px; padding-left: 1.2em; }
.help { font-size: 0.85rem; color: #777; }
.check-list { display: grid; gap: 8px; }
.check-list label { font-weight: 500; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}
.table th { background: #fafafa; }

.note-box {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 16px;
  margin: 16px 0;
}
.muted { color: #777; }
.passcode-mark { font-weight: 700; }
.passcode-mark.ok { color: #2e7d32; }
.minor-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #b71c1c;
  background: #ffebee;
  border: 1px solid #ef9a9a;
  border-radius: 2px;
  vertical-align: middle;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  background: #eee;
  font-size: 0.8rem;
  font-weight: 700;
}
.badge-received { background: #fff3e0; color: #e65100; }
.badge-arrived { background: #e8eaf6; color: #3949ab; }
.badge-appraising { background: #e3f2fd; color: #1565c0; }
.badge-result_notified { background: #f3e5f5; color: #7b1fa2; }
.badge-awaiting_transfer { background: #fff8e1; color: #f57f17; }
.badge-finished { background: #e8f5e9; color: #2e7d32; }
.badge-in_progress { background: #e3f2fd; color: #1565c0; }
.badge-completed { background: #e8f5e9; color: #2e7d32; }
.badge-cancelled { background: #eeeeee; color: #616161; }
.badge-cancelled_undelivered { background: #eeeeee; color: #616161; }
.badge-cancelled_disagreed { background: #fce4ec; color: #ad1457; }

.postal-split {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
}
.postal-split input {
  width: 5.5em;
  text-align: center;
}
.postal-split input[name="postal_code_2"] {
  width: 6.5em;
}
.postal-sep {
  font-weight: 700;
  color: #666;
}

.id-upload-slots {
  display: grid;
  gap: 10px;
  max-width: 520px;
}
.id-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.id-preview {
  margin: 0;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px;
}
.id-preview img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #f7f7f7;
}
.id-preview-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  background: #f7f7f7;
  font-weight: 700;
}
.id-preview figcaption {
  margin-top: 6px;
  font-size: 0.8rem;
  word-break: break-all;
}
