*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #4A90E2;
  --accent-dark: #2f73c8;
  --accent-light: #EBF3FC;
  --bg: #F2F4F8;
  --white: #FFFFFF;
  --text: #1A1D23;
  --text-sub: #5A6272;
  --text-muted: #9CA3AF;
  --border: #E4E7EE;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --radius: 14px;
  --radius-sm: 8px;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon { width: 32px; height: 32px; object-fit: contain; display: block; flex-shrink: 0; }
.logo-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.logo-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}
.header-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-light);
  border: 1px solid #c5ddf7;
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Layout ── */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
  padding-left: calc(20px + env(safe-area-inset-left));
  padding-right: calc(20px + env(safe-area-inset-right));
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #4A90E2 0%, #2f73c8 100%);
  border-radius: var(--radius);
  padding: 28px 24px;
  color: #fff;
  margin-bottom: 24px;
}
.hero-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .8;
  margin-bottom: 8px;
}
.hero-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}
.hero-meta {
  font-size: 13px;
  opacity: .75;
}

/* ── TOC ── */
.toc {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.toc-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toc-title::before {
  content: '';
  width: 3px; height: 13px;
  background: var(--accent);
  border-radius: 3px;
  display: block;
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc-list a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.toc-list a:hover, .toc-list a:active {
  background: var(--accent-light);
  color: var(--accent-dark);
}
.toc-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  min-width: 20px;
  flex-shrink: 0;
}

/* ── Section cards ── */
.section {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px 20px;
  margin-bottom: 12px;
  scroll-margin-top: 80px;
}
.section-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.4;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Text blocks */
.section p {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 12px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.section p:last-child { margin-bottom: 0; }

/* Sub-section */
.sub-section { margin-top: 20px; }
.sub-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sub-title::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--accent);
  border-radius: 3px;
  display: block;
  flex-shrink: 0;
}

/* Lists */
.pp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.pp-list li {
  font-size: 14px;
  color: var(--text-sub);
  padding-left: 16px;
  position: relative;
  line-height: 1.65;
  word-break: keep-all;
}
.pp-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.pp-list.numbered { counter-reset: pp-counter; }
.pp-list.numbered li { padding-left: 22px; }
.pp-list.numbered li::before {
  counter-increment: pp-counter;
  content: counter(pp-counter) '.';
  font-size: 12px;
  font-weight: 600;
  top: 1px;
}

/* Note box */
.note {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: #92400E;
  margin-top: 12px;
  line-height: 1.6;
}

/* Email link */
a.email {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  word-break: break-all;
}
a.email:hover { text-decoration: underline; }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 400px;
}
thead tr {
  background: var(--accent-light);
}
th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--accent-dark);
  font-size: 12px;
  border-bottom: 1px solid #c5ddf7;
  white-space: nowrap;
}
td {
  padding: 10px 14px;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: #FAFBFC; }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Landscape ── */
@media (orientation: landscape) and (max-height: 500px) {
  .header-inner { padding: 8px 16px; }
  .logo-icon { width: 26px; height: 26px; }
  .logo-sub { display: none; }
  .hero { padding: 20px; }
  .hero-title { font-size: 18px; }
}

/* ── Tablet+ ── */
@media (min-width: 600px) {
  .hero { padding: 36px 32px; }
  .hero-title { font-size: 26px; }
  .section { padding: 28px 28px; }
  .section-title { font-size: 18px; }
  .container { padding: 32px 24px 80px; }
}
