:root {
  --brand: #0b5ed7;
  --brand-dark: #08409c;
  --ok: #1c7c3f;
  --warn: #b3261e;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1c1c1e;
  --sub: #6b7280;
  --border: #e2e5ea;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  min-height: 100vh;
}

.header {
  text-align: center;
  padding: 18px 0 10px;
}

.header .company-ja {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-dark);
}

.header .company-en {
  font-size: 12px;
  color: var(--sub);
  margin-top: 2px;
}

.header .system-ja {
  font-size: 20px;
  font-weight: 800;
  margin-top: 10px;
}

.header .system-en {
  font-size: 13px;
  color: var(--sub);
  margin-top: 2px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 22px 18px;
  margin-top: 16px;
}

.phase {
  display: none;
}
.phase.active {
  display: block;
}

.bi-text {
  text-align: center;
  line-height: 1.7;
}
.bi-text .ja {
  font-size: 17px;
  font-weight: 600;
}
.bi-text .en {
  font-size: 14px;
  color: var(--sub);
  margin-top: 4px;
}

.big-button {
  display: block;
  width: 100%;
  padding: 16px 20px;
  margin-top: 22px;
  border: none;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.big-button:active {
  background: var(--brand-dark);
}
.big-button.secondary {
  background: #fff;
  color: var(--brand);
  border: 2px solid var(--brand);
}
.big-button:disabled {
  background: #b7c3d6;
  cursor: not-allowed;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #dbe4f3;
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: 20px auto;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.field {
  margin-top: 16px;
}
.field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.field label .en-label {
  display: block;
  font-weight: 400;
  color: var(--sub);
  font-size: 12px;
  margin-top: 1px;
}
.field .required-badge {
  color: var(--warn);
  font-size: 12px;
  margin-left: 4px;
}
.field .optional-badge {
  color: var(--sub);
  font-size: 12px;
  margin-left: 4px;
}
.field input[type="text"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
.field textarea {
  min-height: 80px;
  resize: vertical;
}

.upload-box {
  margin-top: 16px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #fafbfc;
}
.upload-box input[type="file"] {
  width: 100%;
  margin-top: 8px;
  font-size: 14px;
}
.file-chosen {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ok);
  font-weight: 600;
  word-break: break-all;
}

.error-box {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fdecea;
  border: 1px solid #f3c2bd;
  border-radius: 10px;
  color: var(--warn);
  font-size: 13px;
  line-height: 1.5;
  display: none;
}
.error-box.show {
  display: block;
}

.queue-number {
  text-align: center;
  font-size: 56px;
  font-weight: 900;
  color: var(--brand);
  margin: 6px 0 0;
}
.queue-label {
  text-align: center;
  font-size: 13px;
  color: var(--sub);
}
.status-pill {
  display: inline-block;
  margin: 14px auto 0;
  padding: 6px 16px;
  border-radius: 999px;
  background: #fff3cd;
  color: #8a6516;
  font-weight: 700;
  font-size: 13px;
}
.status-pill.entering {
  background: #d9f2e3;
  color: var(--ok);
}

.gate-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 8px;
  background: #eef2f8;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
}

.guide-box {
  margin-top: 18px;
  padding: 16px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: #fafbfc;
  color: var(--sub);
  font-size: 13px;
  min-height: 60px;
}

.footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--sub);
  margin-top: 24px;
  line-height: 1.6;
}

@media (max-width: 360px) {
  .queue-number {
    font-size: 44px;
  }
}
