/* Limited to the SHINSEI event form's route field; other CF7 fields are untouched. */
.shinsei-route-field .shinsei-route-help {
  font-size: 13px; line-height: 1.85; color: #777067;
  margin: 2px 0 18px; letter-spacing: .01em;
}
.shinsei-route-field .shinsei-route-picker { max-width: 840px; width: 100%; }
.shinsei-route-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; width: 100%;
}
.shinsei-route-card {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative;
  border: 1px solid #e1dcd3; border-radius: 10px;
  background: #fcfbf9; padding: 17px 9px 15px;
  min-height: 130px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  text-align: center; font: inherit; color: #37332d;
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.shinsei-route-card:hover { border-color: #a89b87; background: #f8f5f0; transform: translateY(-1px); }
.shinsei-route-card:focus-visible { outline: 3px solid #9d8061; outline-offset: 3px; }
.shinsei-route-card.is-selected {
  background: #f1ebe1; border-color: #96816a;
  box-shadow: inset 0 0 0 1px #96816a;
}
.shinsei-route-imgwrap { width: 52px; height: 52px; display:flex; align-items:center; justify-content:center; }
.shinsei-route-image { width: 48px; height: 48px; object-fit: contain; display: block; }
.shinsei-route-name { font-size: 12px; line-height: 1.5; font-weight: 500; overflow-wrap: anywhere; }
.shinsei-route-number {
  position: absolute; top: 8px; right: 8px; width: 23px; height: 23px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 100%; border: 1px solid #ddd5ca;
  font-size: 11px; color: #a59c90; background: #fff;
  line-height: 1; font-weight: 600;
}
.shinsei-route-card.is-selected .shinsei-route-number {
  background: #716151; color: #fff; border-color: #716151;
}
.shinsei-route-footer {
  border-top: 1px solid #e6e0d6; margin-top: 18px;
  padding-top: 17px; display:flex; flex-direction:column; align-items:flex-start; gap: 9px;
}
.shinsei-route-caption { margin: 0; font-size: 12px; color: #777067; font-weight: 600; }
.shinsei-route-sequence { display:flex; flex-wrap:wrap; align-items:center; gap: 6px; line-height: 1.8; }
.shinsei-route-pill { background: #f4f0e9; border: 1px solid #e5dcd0; border-radius: 5px; padding: 4px 9px; font-size: 12px; color: #554b40; }
.shinsei-route-arrow { font-size: 15px; color: #a1988d; }
.shinsei-route-empty { font-size: 12px; color: #8b8175; }
.shinsei-route-reset {
  all: unset; box-sizing: border-box; cursor: pointer; font-size: 12px;
  text-decoration: underline; text-underline-offset: 3px; color: #6d6255;
  padding: 4px 0;
}
.shinsei-route-reset:hover { color: #231e19; }
.shinsei-route-reset:focus-visible { outline: 2px solid #88735a; outline-offset: 2px; }
.shinsei-route-reset[hidden], .shinsei-route-error[hidden] { display: none !important; }
.shinsei-route-error { color: #bc2525; font-size: 13px; margin: 8px 0 0; }
/* Hide the original CF7 controls only when the JS picker is working.
   Keep the original checkbox* tag so existing mail and Sheets integrations use media[]. */
.shinsei-route-field.shinsei-route-ready .wpcf7-form-control-wrap {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
}
@media (max-width: 920px) {
  .shinsei-route-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
}
@media (max-width: 560px) {
  .shinsei-route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .shinsei-route-card { min-height: 128px; padding: 14px 7px 13px; }
  .shinsei-route-image { width: 44px; height: 44px; }
  .shinsei-route-name { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .shinsei-route-card { transition: none; }
}
