:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #edf4f0;
  --ink: #17201d;
  --muted: #68766f;
  --line: rgba(23, 32, 29, 0.11);
  --accent: #2f6f67;
  --deep: #13211e;
  --danger: #b42318;
  --warning: #9a6700;
  --serif: "Noto Serif JP", serif;
  --sans: "Noto Sans JP", sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell { min-height: 100svh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px clamp(20px, 5vw, 64px); background: rgba(246,248,247,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-family: var(--serif); letter-spacing: .08em; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.top-links { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px; }
.top-links a { text-decoration: none; }
.top-links a:hover { color: var(--accent); }

.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.hero { padding: clamp(68px, 11vw, 132px) 0 72px; background: radial-gradient(circle at 12% 12%, rgba(151,215,181,.26), transparent 30%), radial-gradient(circle at 86% 18%, rgba(145,211,234,.22), transparent 27%); }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { max-width: 900px; margin: 0; font-family: var(--serif); font-size: clamp(36px, 7vw, 78px); font-weight: 300; line-height: 1.35; letter-spacing: .01em; }
.hero-copy { max-width: 680px; margin: 26px 0 0; color: var(--muted); font-size: clamp(15px, 2vw, 18px); line-height: 2.05; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.chip { padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; background: var(--accent); color: white; text-decoration: none; font-size: 13px; font-weight: 700; cursor: pointer; }
.button.secondary { background: var(--surface); color: var(--accent); border-color: rgba(47,111,103,.28); }
.button.disabled { background: #dfe5e2; color: #7b8882; cursor: default; }

.section { padding: 76px 0; }
.section.white { background: var(--surface); }
.section.soft { background: var(--surface-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section h2 { margin: 0; font-family: var(--serif); font-size: clamp(27px, 4vw, 44px); font-weight: 300; line-height: 1.5; }
.section-note { max-width: 520px; margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.app-card { --app: var(--accent); display: flex; min-height: 220px; flex-direction: column; justify-content: space-between; gap: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; box-shadow: 0 16px 38px rgba(23,32,29,.045); transition: transform .2s ease, border-color .2s ease; }
.app-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--app) 45%, transparent); }
.app-card-top { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.app-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--app); color: #fff; font-family: var(--serif); font-size: 22px; }
.status { padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--app) 11%, white); color: color-mix(in srgb, var(--app) 74%, var(--ink)); font-size: 10px; font-weight: 700; }
.app-card h3 { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 400; }
.app-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.arrow { color: var(--app); font-size: 13px; font-weight: 700; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature { min-height: 120px; padding: 24px; background: var(--surface); }
.feature strong { display: block; margin-bottom: 8px; font-family: var(--serif); font-size: 18px; font-weight: 400; }
.feature span { color: var(--muted); font-size: 13px; }

.portal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100svh - 66px); }
.sidebar { padding: 26px 16px; background: var(--deep); color: #eef5f2; }
.sidebar-label { margin: 0 12px 14px; color: rgba(238,245,242,.48); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px; color: rgba(238,245,242,.68); text-decoration: none; font-size: 13px; }
.side-nav a:hover, .side-nav a.active { background: rgba(255,255,255,.09); color: #fff; }
.side-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--app, #7fa79f); }
.portal-main { min-width: 0; padding: clamp(28px, 5vw, 60px); }
.portal-title { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4vw, 48px); font-weight: 300; }
.portal-lead { margin: 10px 0 30px; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0 34px; }
.metric { padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.metric-label { color: var(--muted); font-size: 11px; }
.metric-value { display: block; margin-top: 8px; font-family: var(--serif); font-size: 27px; line-height: 1.25; }
.metric-caption { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.panel { margin-top: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.panel h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.panel-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.notice { padding: 13px 15px; border-radius: 9px; background: #fff8e7; color: #7a5500; font-size: 12px; }
.notice.safe { background: #edf8f1; color: #26613c; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td input { width: 78px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.health { display: inline-flex; align-items: center; gap: 7px; }
.health::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #97a49e; }
.health.ok::before { background: #2e9b55; }
.health.error::before { background: var(--danger); }
.health.checking::before { background: #d49b19; animation: pulse 1s infinite alternate; }

.empty { padding: 34px 20px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); font-size: 13px; }
.portal-footer { padding: 26px 0 10px; color: var(--muted); font-size: 11px; }
@keyframes pulse { to { opacity: .35; } }

@media (max-width: 900px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-layout { grid-template-columns: 1fr; }
  .sidebar { padding: 12px 18px; overflow-x: auto; }
  .sidebar-label { display: none; }
  .side-nav { display: flex; width: max-content; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .top-links a:not(:last-child) { display: none; }
  .hero { padding-top: 56px; }
  .app-grid, .feature-grid, .metric-grid { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .portal-main { padding: 26px 20px; }
  .panel { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

.policy-shell { padding: 40px 0 80px; }
.policy-wrap { width: min(calc(100% - 40px), 760px); margin: 0 auto; }
.policy-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; color: var(--muted); font-size: 13px; text-decoration: none; }
.policy-back:hover { color: var(--accent); }
.policy-language { display: flex; align-items: center; gap: 6px; width: fit-content; margin: -8px 0 18px auto; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 11px; }
.policy-language a, .policy-language span { padding: 3px 9px; border-radius: 999px; text-decoration: none; }
.policy-language a { color: var(--muted); }
.policy-language a:hover { color: var(--accent); }
.policy-language [aria-current="page"] { background: var(--surface-soft); color: var(--ink); font-weight: 700; }
.policy-head h1 { margin: 0 0 6px; font-family: var(--serif); font-size: clamp(26px, 4vw, 36px); font-weight: 400; }
.policy-updated { margin: 0 0 24px; color: var(--muted); font-size: 12px; }
.policy-scope { margin: 0 0 28px; padding: 13px 15px; border-radius: 9px; background: #edf8f1; color: #26613c; font-size: 12px; line-height: 1.7; }
.policy-section { padding: 22px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.policy-section h2 { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.policy-section p { margin: 0 0 10px; font-size: 13px; line-height: 1.85; color: var(--ink); }
.policy-section p:last-child { margin-bottom: 0; }
.policy-section ul { margin: 0 0 10px; padding-left: 18px; font-size: 13px; line-height: 1.85; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.policy-section ul:last-child { margin-bottom: 0; }
.policy-index { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.policy-index a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--ink); }
.policy-index a:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.policy-index strong { font-size: 14px; font-weight: 700; }
.policy-index span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.policy-index .arrow { color: var(--accent); font-size: 13px; flex-shrink: 0; }
