
:root {
  --ink: #1C2B22;
  --paper: #EFEAE0;
  --card: #FFFFFF;
  --rail-green: #0B5D3B;
  --rail-green-dark: #073D27;
  --go: #1E8F5E;
  --go-bg: #E3F4EA;
  --wait: #D9870E;
  --wait-bg: #FBEEDB;
  --full: #8B8B86;
  --full-bg: #ECEAE5;
  --line: #CFC7B2;
  --ticket: #FFFBF2;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  padding-bottom: 32px;
}

.header {
  background: linear-gradient(135deg, var(--rail-green), var(--rail-green-dark));
  color: #fff;
  padding: 18px 20px 24px;
  position: relative;
}
.header-eyebrow {
  font-size: 11px;
  letter-spacing: .12em;
  opacity: .8;
  font-weight: 500;
}
.header h1 {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 20px;
  font-weight: 800;
  margin: 4px 0 0;
}
.header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 10px;
  background-image: radial-gradient(circle at 10px 0, transparent 6px, var(--paper) 6px);
  background-size: 20px 10px;
}

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

.step-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--rail-green);
  background: var(--go-bg);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.card h3 {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 17px;
  margin: 0 0 10px;
}
.hint { font-size: 12px; color: #8A8377; margin: -4px 0 10px; }

input[type=date], input[type=text], input[type=email],input[type=number], select, textarea {
  width: 100%;
  font-size: 16px;
  font-family: inherit;
  padding: 12px 14px;
  margin: 6px 0;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rail-green);
}
textarea { resize: vertical; min-height: 60px; }
label.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #8A8377;
  margin-top: 10px;
}

button { font-family: inherit; }

.btn-primary {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  background: var(--rail-green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary:active { background: var(--rail-green-dark); }

#slots { display: flex; flex-direction: column; gap: 10px; }

.slot {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
}
.slot::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--line);
}
.slot-info { flex: 1; }
.slot-time {
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.slot-sub {
  font-size: 11px;
  color: #8A8377;
  margin-top: 2px;
  font-weight: 500;
}
.status-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}
.status-go   { background: var(--go-bg);   color: var(--go); }
.status-wait { background: var(--wait-bg); color: var(--wait); }
.status-full { background: var(--full-bg); color: var(--full); }

.slot.active { cursor: pointer; }
.slot.active::before { background: var(--go); }
.slot.full { opacity: .55; }
.slot.selected { border-color: var(--rail-green); background: var(--go-bg); }
.slot.selected::before { background: var(--rail-green); }

#selectedTime {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--rail-green);
  margin-bottom: 6px;
}

.error-box {
  background: var(--wait-bg);
  color: #8a4d05;
  border: 2px solid var(--wait);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
}

.ticket {
  background: var(--ticket);
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--line);
}
.ticket-perf {
  height: 14px;
  background-image: radial-gradient(circle at 7px 7px, transparent 7px, var(--ticket) 7px);
  background-size: 14px 14px;
  background-position: -7px -7px;
  background-color: var(--paper);
}
.ticket-body { padding: 22px 20px; text-align: center; }
.ticket-eyebrow {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--go);
  font-weight: 700;
  margin-bottom: 6px;
}
.ticket-body h2 {
  font-family: "M PLUS Rounded 1c", sans-serif;
  margin: 0 0 18px;
  font-size: 19px;
}
.ticket-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  text-align: left;
}
.ticket-row:last-child { border-bottom: none; }
.ticket-row span { color: #8A8377; }
.ticket-row strong { font-variant-numeric: tabular-nums; font-size: 15px; }

.ticket-qr {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed #d8d0c5;
  text-align: center;
}

.ticket-qr img {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  image-rendering: pixelated;
}

.ticket-qr-text {
  margin-top: 10px;
  font-size: 12px;
  color: #8a8377;
  line-height: 1.6;
}