:root {
  --c-bg: #f3f6f9;
  --c-white: #ffffff;
  --c-navy: #14306b;
  --c-navy-deep: #0e2350;
  --c-teal: #0b7373;
  --c-teal-soft: #e3f2f1;
  --c-text: #26313d;
  --c-muted: #56626e;
  --c-line: #dde3ea;
  --c-note-bg: #fff6e8;
  --c-note-line: #e0952b;
  --c-focus: #b5541a;

  --f-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, system-ui, sans-serif;
  --gutter: 16px;
  --header-h: 60px;
  --radius: 18px;
  --shadow-sm: 0 2px 10px rgba(20, 48, 107, 0.06);
  --shadow-md: 0 12px 30px rgba(20, 48, 107, 0.1);
}
@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 72px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow-x: clip;
  word-break: auto-phrase;
  line-break: strict;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--c-navy);
  color: #fff;
  border-radius: 8px;
}
.skip-link:focus { top: 8px; }
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px var(--gutter);
  flex-wrap: wrap;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-navy);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.3;
}
.site-header__brand img { width: 104px; height: auto; }
@media (min-width: 768px) {
  .site-header__brand img { width: 128px; }
  .site-header__brand { font-size: 0.95rem; }
}
.site-header__back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid var(--c-teal);
  border-radius: 999px;
  color: var(--c-teal);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.site-header__back:hover { background: var(--c-teal); color: #fff; }
.site-header__back svg { width: 14px; height: 14px; }

.version-nav {
  order: 3;
  flex-basis: 100%;
}
.version-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0;
  list-style: none;
  border-radius: 999px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
}
@media (min-width: 900px) {
  .version-nav {
    order: 0;
    flex-basis: auto;
    width: 340px;
    margin-left: auto;
  }
  .site-header__back { margin-left: 0; }
}
.version-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-muted);
  text-decoration: none;
}
.version-switch a:hover { color: var(--c-navy); background: rgba(255, 255, 255, 0.7); }
.version-switch a[aria-current='page'] {
  background: var(--c-navy);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.demo-banner {
  background: var(--c-navy-deep);
  color: #fff;
  font-size: 0.8rem;
  text-align: center;
  padding: 8px var(--gutter);
  line-height: 1.6;
}

.page-head { padding: 28px 0 20px; }
@media (min-width: 768px) { .page-head { padding: 44px 0 28px; } }
.page-head__label {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--c-teal-soft);
  color: var(--c-teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.page-head h1 {
  margin-top: 10px;
  font-size: clamp(1.45rem, 5vw, 2.1rem);
  line-height: 1.45;
  color: var(--c-navy);
}
.page-head__lead {
  margin-top: 10px;
  color: var(--c-muted);
  font-size: 0.95rem;
}
.rate-note {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--c-note-bg);
  border-left: 4px solid var(--c-note-line);
  font-size: 0.88rem;
}
.rate-note strong { color: var(--c-navy); }

.demo-area { padding-bottom: 48px; }

.view-tabs {
  display: none;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 14px;
  background: var(--c-white);
  border: 1px solid var(--c-line);
}
.view-tabs button {
  position: relative;
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--c-muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.view-tabs button[aria-selected='true'] {
  background: var(--c-navy);
  color: #fff;
}
.view-tabs__badge {
  position: absolute;
  top: 6px;
  right: 10px;
  padding: 0 7px;
  border-radius: 999px;
  background: #b5541a;
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.6;
}
@media (max-width: 768px) {
  .view-tabs { display: flex; }
  .mlb-demo[data-view='store'] .mlb-panel--customer,
  .mlb-demo[data-view='customer'] .mlb-panel--store { display: none; }
}

.choice-list {
  display: grid;
  gap: 20px;
  padding: 0;
  margin: 0 0 40px;
  list-style: none;
}
@media (min-width: 900px) {
  .choice-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}
.choice-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  height: 100%;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--c-white);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.choice-card:hover { border-color: var(--c-teal); box-shadow: var(--shadow-md); transform: translateY(-2px); }
@media (min-width: 768px) {
  .choice-card { grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 28px; }
}
.choice-card__img {
  border-radius: 10px;
  background: var(--c-bg);
  padding: 6px;
}
.choice-card__tag {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--c-teal-soft);
  color: var(--c-teal);
  font-size: 0.75rem;
  font-weight: 700;
}
.choice-card__title {
  margin-top: 6px;
  font-size: 1.3rem;
  color: var(--c-navy);
}
.choice-card__text {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--c-muted);
}
.choice-card__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-weight: 700;
  color: var(--c-teal);
  font-size: 0.92rem;
}
.top-notes {
  margin-bottom: 48px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--c-white);
  font-size: 0.85rem;
  color: var(--c-muted);
}
.top-notes ul { margin: 0; padding-left: 1.2em; }
.top-notes li + li { margin-top: 4px; }

.site-footer {
  padding: 24px 0 32px;
  background: var(--c-white);
  border-top: 1px solid var(--c-line);
  font-size: 0.8rem;
  color: var(--c-muted);
  text-align: center;
}
.site-footer a { color: var(--c-teal); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
