:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f3f9fd;
  --text: #102a43;
  --muted: #4f6475;
  --primary: #0068b7;
  --primary-dark: #004b8d;
  --accent: #00a6d6;
  --border: #d8e8f2;
  --shadow: 0 12px 30px rgba(0, 75, 141, 0.10);
  --max-width: 1120px;
  --font-sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --external-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23004b8d' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3h7v7'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M21 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(100% - 40px,var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-140%);
  padding: 10px 14px;
  color: #fff;
  background: var(--primary-dark);
  border-radius: 8px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: #fff;
  border-top: 6px solid var(--primary);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
}

.brand-text {
  font-size: clamp(1rem,2vw,1.35rem);
}

.breadcrumb {
  padding: 8px 0 6px;
  font-size: .86rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  margin-left: 6px;
  color: var(--muted);
  content: ">";
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.page-hero {
  background: #f7fbfe;
  border-block: 1px solid var(--border);
}

.page-hero-inner {
  padding: 18px 0 20px;
}

.page-hero h1 {
  margin: 0;
  color: var(--primary-dark);
  font-size: clamp(1.55rem,3vw,2.35rem);
  line-height: 1.25;
}

.page-nav-section {
  padding-top: 12px;
}

.page-nav {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.page-nav-label {
  grid-column: 1/-1;
  color: var(--primary-dark);
  font-weight: 900;
}

.page-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--primary-dark);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.page-nav a:hover,.page-nav a:focus-visible {
  background: #f8fcff;
  border-color: var(--accent);
}

.content-layout {
  padding: 16px 0 28px;
}

.main-content {
  display: grid;
  gap: 14px;
}

.content-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.content-card h2 {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: clamp(1.12rem,2vw,1.38rem);
}

.content-card ul {
  padding-left: 1.4em;
}

.procedure-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.procedure-item {
  position: relative;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,75,141,.06);
  scroll-margin-top: 24px;
}

.procedure-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg,var(--primary),var(--accent));
  border-radius: 12px 12px 0 0;
}

.procedure-item h3 {
  margin: 0 0 4px;
  padding-top: 2px;
  color: var(--primary-dark);
  font-size: 1rem;
}

.procedure-item p {
  margin: 0 0 6px;
  font-size: .92rem;
  line-height: 1.52;
}

.procedure-block,.submission-box {
  margin-top: 8px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.procedure-block h4,.submission-box strong {
  display: inline-flex;
  margin: 0 0 5px;
  padding: 1px 8px;
  color: var(--primary-dark);
  font-size: .9rem;
  background: var(--surface-soft);
  border-radius: 999px;
}

.link-list,.document-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
}

.link-list a,.document-list a {
  position: relative;
  display: block;
  padding: 8px 34px 8px 10px;
  color: var(--primary-dark);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.link-list a:hover,.link-list a:focus-visible {
  background: #f8fcff;
  border-color: var(--accent);
}

.document-list a:hover,.document-list a:focus-visible {
  background: #f8fcff;
  border-color: var(--accent);
}

.external-link::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  background-color: #ffffff;
  background-image: var(--external-link-icon);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
  border: 1px solid rgba(0, 104, 183, 0.16);
  border-radius: 999px;
}

.document-title,.document-meta {
  display: block;
}

.document-meta {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 400;
}

.deadline {
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  display: flex !important;
  margin: 3px 0 0 !important;
  padding: 5px 9px;
  color: #8a4b00;
  background: #fff8e8;
  border: 1px solid #f2c46d;
  border-radius: 10px;
}

.deadline2 {
  display: inline-flex !important;
  margin: 3px 0 0 !important;
  padding: 5px 9px;
  color: #8a4b00;
  background: #fff8e8;
  border: 1px solid #f2c46d;
  border-radius: 10px;
}

.contact-picture {
  display: block;
  margin-top: 6px;
}

.contact-picture img {
  display: block;
  width: min(72vw, 290px);
  max-width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: contain;
}

.email-notice {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fff8e8;
  border: 1px solid #f2c46d;
  border-radius: 12px;
}

.email-notice>strong {
  display: block;
  margin-bottom: 6px;
  color: #8a4b00;
}

.email-notice>ul {
  margin-top: 6px;
}

.blocked-extensions {
  margin-top: 8px !important;
  padding: 10px 12px;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  background: #fff;
  border: 1px solid #ead9b7;
  border-radius: 8px;
}

.related-categories {
  padding-bottom: 26px;
}

.related-categories h2 {
  color: var(--primary-dark);
}

.related-category-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.related-category-list a {
  display: block;
  padding: 11px 14px;
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.footer-inner p {
  margin: 0;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width:900px) {
  .page-nav {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .procedure-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width:640px) {
  .container {
    width: min(100% - 24px,var(--max-width));
  }

  .page-nav {
    grid-template-columns: 1fr;
  }

  .content-card {
    padding: 18px;
  }

  .document-list,.link-list {
    grid-template-columns: 1fr;
  }

  .related-category-list {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }
}

.deadline-label {
  flex: 0 0 auto;
  padding: 1px 9px;
  color: #fff;
  line-height: 1.7;
  white-space: nowrap;
  background: #b36b00;
  border-radius: 999px;
}

.deadline-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
