:root {
  color-scheme: light;
  --ink: #15201d;
  --muted: #66726e;
  --line: #dbe2df;
  --paper: #f5f7f4;
  --surface: #ffffff;
  --deep-green: #163f35;
  --green: #2b6b5a;
  --mint: #dff1e8;
  --yellow: #f2e487;
  --blue: #dce9f1;
  --orange: #f4dfcf;
  --purple: #e8e2f2;
  --shadow: 0 16px 40px rgb(23 50 42 / 8%);
  font-family:
    Inter, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 2%, rgb(223 241 232 / 80%), transparent 22rem),
    var(--paper);
  line-height: 1.7;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  color: white;
  background: var(--deep-green);
  border-radius: 0.5rem;
  transform: translateY(-200%);
}

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

.site-header,
.site-footer,
main {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid rgb(21 32 29 / 12%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  font-size: 0.83rem;
  font-weight: 900;
  letter-spacing: 0.32em;
}

.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.brand-product {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.header-status strong {
  color: var(--deep-green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.account-panel {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-left: 1.3rem;
  border-left: 1px solid var(--line);
}

.account-copy {
  display: grid;
  line-height: 1.35;
}

.account-copy span {
  color: var(--muted);
  font-size: 0.6rem;
}

.account-copy strong {
  font-size: 0.72rem;
}

.account-panel form {
  margin: 0;
}

.account-panel button {
  padding: 0.42rem 0.65rem;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 750;
}

.account-panel button:hover,
.account-panel button:focus-visible {
  color: white;
  background: var(--deep-green);
  border-color: var(--deep-green);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #39a67d;
  border: 2px solid #b8e5d4;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(57 166 125 / 11%);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.65fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
  padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(5rem, 9vw, 8rem);
}

.eyebrow,
.section-number,
.tool-category,
.mode-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow,
.section-number {
  color: var(--green);
}

.hero h1 {
  max-width: 760px;
  margin: 1.2rem 0 1.5rem;
  font-size: clamp(3rem, 7.2vw, 6.7rem);
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 1.02;
}

.hero-description {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
}

.signed-in-copy {
  display: inline-flex;
  margin: 1.4rem 0 0;
  padding: 0.35rem 0.65rem;
  color: var(--green);
  background: rgb(223 241 232 / 65%);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 750;
}

.mode-panel {
  position: relative;
  overflow: hidden;
  padding: 1.65rem;
  color: white;
  background: var(--deep-green);
  border-radius: 1.1rem;
  box-shadow: 0 24px 60px rgb(16 55 45 / 18%);
}

.mode-panel::after {
  position: absolute;
  right: -34px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  content: "";
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px rgb(255 255 255 / 4%),
    0 0 0 44px rgb(255 255 255 / 3%);
}

.mode-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.mode-panel-heading strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.45rem;
}

.mode-label {
  color: rgb(255 255 255 / 65%);
}

.mode-icon {
  width: 38px;
  height: 38px;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
}

.mode-icon::after {
  display: block;
  width: 10px;
  height: 10px;
  margin: 13px;
  content: "";
  background: #8be1bd;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(139 225 189 / 15%);
}

.mode-panel > p {
  margin: 1rem 0;
  color: rgb(255 255 255 / 72%);
  font-size: 0.82rem;
}

.mode-meta {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  font-size: 0.76rem;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.mode-meta span {
  color: rgb(255 255 255 / 60%);
}

.mode-panel .mode-note {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  padding-top: 0.8rem;
  font-size: 0.68rem;
}

.tool-section {
  padding: clamp(3.2rem, 6vw, 5rem);
  background: rgb(255 255 255 / 82%);
  border: 1px solid rgb(21 32 29 / 8%);
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.section-heading h2,
.notice-panel h2,
.capability-section h2 {
  margin: 0.4rem 0;
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.section-heading > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.search-field {
  display: flex;
  align-items: center;
  width: min(320px, 100%);
  padding: 0 1rem;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 0.7rem;
}

.search-field:focus-within {
  border-color: var(--green);
  outline: 3px solid rgb(43 107 90 / 10%);
}

.search-field input {
  width: 100%;
  padding: 0.85rem 0.65rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-icon {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}

.search-icon::after {
  display: block;
  width: 6px;
  height: 1.5px;
  margin: 10px 0 0 10px;
  content: "";
  background: var(--muted);
  transform: rotate(45deg);
  transform-origin: left center;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 2.4rem 0 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.filter-chip {
  padding: 0.48rem 0.82rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
}

.filter-chip:hover,
.filter-chip:focus-visible,
.filter-chip.is-active {
  color: white;
  background: var(--deep-green);
  border-color: var(--deep-green);
}

.result-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 350px;
  overflow: hidden;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.tool-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 78px;
  height: 78px;
  content: "";
  background: var(--card-accent, var(--mint));
  border-radius: 0 0 0 100%;
  opacity: 0.75;
}

.tool-card:hover {
  border-color: rgb(43 107 90 / 38%);
  box-shadow: 0 18px 34px rgb(23 50 42 / 9%);
  transform: translateY(-3px);
}

.accent-mint {
  --card-accent: var(--mint);
}

.accent-yellow {
  --card-accent: var(--yellow);
}

.accent-blue {
  --card-accent: var(--blue);
}

.accent-orange {
  --card-accent: var(--orange);
}

.accent-purple {
  --card-accent: var(--purple);
}

.tool-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tool-number {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.tool-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0.2rem 0.55rem;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 750;
}

.status-available {
  color: #175d48;
  background: #e7f5ef;
  border-color: #bee2d4;
}

.status-maintenance {
  color: #7a531b;
  background: #fff7dc;
  border-color: #edda9a;
}

.status-prototype {
  color: #365b77;
  background: #e8f3fa;
  border-color: #c8dfed;
}

.tool-category {
  margin-top: 2.1rem;
  color: var(--green);
}

.tool-card h3 {
  margin: 0.45rem 0 0.8rem;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.tool-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.tool-tags li {
  padding: 0.25rem 0.5rem;
  color: #53605c;
  background: var(--paper);
  border-radius: 0.3rem;
  font-size: 0.64rem;
}

.tool-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.95rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
  border-top: 1px solid var(--line);
}

.tool-link span:last-child {
  font-size: 1.1rem;
  transition: transform 150ms ease;
}

.tool-link:hover span:last-child {
  transform: translateX(4px);
}

.loading-card {
  min-height: 350px;
  background:
    linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 80%) 50%, transparent 70%),
    #eef1ef;
  background-size: 200% 100%;
  border-radius: 1rem;
  animation: loading 1.2s infinite linear;
}

@keyframes loading {
  to {
    background-position-x: -200%;
  }
}

.empty-state,
.error-message {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  border-radius: 0.8rem;
}

.empty-state p {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
}

.notice-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.4rem;
  align-items: center;
  margin: 2rem 0 6rem;
  padding: 2.1rem;
  background: var(--yellow);
  border-radius: 1.1rem;
}

.notice-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgb(21 32 29 / 40%);
  border-radius: 50%;
  font-weight: 800;
}

.notice-panel h2 {
  max-width: 700px;
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
}

.notice-panel p:last-child {
  margin: 0;
  color: rgb(21 32 29 / 70%);
  font-size: 0.78rem;
}

.notice-state {
  padding: 0.55rem 0.8rem;
  border: 1px solid rgb(21 32 29 / 28%);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  border-top: 1px solid var(--line);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.back-link {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
}

.back-link::before {
  margin-right: 0.45rem;
  content: "←";
}

.tool-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.detail-account {
  padding-right: 1rem;
  color: var(--muted);
  border-right: 1px solid var(--line);
  font-size: 0.68rem;
}

.tool-detail-shell {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 8rem);
  min-height: calc(100vh - 190px);
  padding: clamp(4rem, 8vw, 8rem) 0;
}

.tool-detail-number {
  color: rgb(22 63 53 / 13%);
  font-size: clamp(7rem, 20vw, 15rem);
  font-weight: 800;
  letter-spacing: -0.1em;
  line-height: 0.78;
}

.tool-detail-content {
  max-width: 720px;
}

.tool-detail-title-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0.7rem 0 1.4rem;
}

.tool-detail-title-row h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.tool-detail-description {
  max-width: 630px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.preparation-banner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 2.5rem 0;
  padding: 1.2rem 1.3rem;
  background: var(--mint);
  border-radius: 0.8rem;
}

.preparation-banner p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.preparation-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  background: var(--green);
  border-radius: 50%;
}

.capability-section {
  margin-top: 3.4rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}

.capability-section h2 {
  font-size: 1.55rem;
}

.capability-section ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.capability-section li {
  padding: 0.9rem 1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  font-size: 0.78rem;
}

.capability-section li::before {
  margin-right: 0.6rem;
  color: var(--green);
  content: "•";
}

.primary-link {
  display: flex;
  justify-content: space-between;
  width: min(300px, 100%);
  margin-top: 3rem;
  padding: 0.9rem 1.1rem;
  color: white;
  background: var(--deep-green);
  border-radius: 0.6rem;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.login-page {
  min-height: 100vh;
  background: var(--surface);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  width: 100%;
  min-height: 100vh;
  margin: 0;
}

.login-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 5rem);
  color: white;
  background:
    radial-gradient(circle at 84% 78%, rgb(139 225 189 / 18%), transparent 18rem),
    linear-gradient(145deg, #102d27, var(--deep-green));
}

.login-brand {
  align-self: flex-start;
  color: white;
}

.login-brand .brand-divider {
  background: rgb(255 255 255 / 25%);
}

.login-intro > div {
  max-width: 700px;
  padding: 4rem 0;
}

.login-intro .eyebrow {
  color: #8be1bd;
}

.login-intro h1 {
  margin: 1.2rem 0 1.8rem;
  font-size: clamp(3rem, 6vw, 6.2rem);
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 1.03;
}

.login-intro > div > p:last-child {
  max-width: 600px;
  margin: 0;
  color: rgb(255 255 255 / 70%);
  font-size: clamp(0.88rem, 1.2vw, 1.05rem);
}

.login-intro-note {
  margin: 0;
  color: rgb(255 255 255 / 48%);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.login-card {
  align-self: center;
  width: min(430px, calc(100% - 64px));
  margin: 3rem auto;
}

.login-card-heading h2 {
  margin: 0.35rem 0 0.4rem;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  letter-spacing: -0.05em;
}

.login-card-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.form-message {
  margin-top: 1.4rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.55rem;
  font-size: 0.75rem;
}

.form-message-error {
  color: #822f2f;
  background: #fff0ed;
  border: 1px solid #f0c7bf;
}

.form-message-success {
  color: #175d48;
  background: #e7f5ef;
  border: 1px solid #bee2d4;
}

.login-form {
  display: grid;
  gap: 1.15rem;
  margin-top: 2rem;
}

.login-form label {
  display: grid;
  gap: 0.45rem;
}

.login-form label > span {
  font-size: 0.72rem;
  font-weight: 750;
}

.login-form input {
  width: 100%;
  min-height: 50px;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  outline: 0;
}

.login-form input:focus {
  background: white;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(43 107 90 / 10%);
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-top: 0.3rem;
  padding: 0.8rem 1rem;
  color: white;
  background: var(--deep-green);
  border: 0;
  border-radius: 0.55rem;
  cursor: pointer;
  font-weight: 750;
}

.login-button:hover,
.login-button:focus-visible {
  background: #205345;
  box-shadow: 0 0 0 4px rgb(43 107 90 / 12%);
}

.login-security-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.login-security-note p {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.65;
}

.security-lock {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 13px;
  margin-top: 0.2rem;
  border: 1.5px solid var(--green);
  border-radius: 0.2rem;
}

.security-lock::before {
  position: absolute;
  top: -8px;
  left: 3px;
  width: 7px;
  height: 8px;
  content: "";
  border: 1.5px solid var(--green);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .mode-panel {
    max-width: 520px;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notice-panel {
    grid-template-columns: auto 1fr;
  }

  .notice-state {
    grid-column: 2;
    justify-self: start;
  }

  .tool-detail-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .tool-detail-number {
    font-size: 6rem;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: auto;
    padding: 2rem clamp(1.5rem, 7vw, 4rem) 3.5rem;
  }

  .login-intro > div {
    padding: 5rem 0 3rem;
  }

  .login-intro h1 {
    font-size: clamp(3rem, 10vw, 5.2rem);
  }

  .login-card {
    margin: 5rem auto;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 28px, 1200px);
  }

  .site-header {
    min-height: 72px;
  }

  .header-status {
    display: none;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .account-panel {
    padding-left: 0;
    border-left: 0;
  }

  .account-copy {
    display: none;
  }

  .hero {
    padding: 3.6rem 0 4rem;
  }

  .hero h1 {
    margin-top: 0.9rem;
    font-size: clamp(2.8rem, 15vw, 4.4rem);
  }

  .desktop-break {
    display: none;
  }

  .tool-section {
    padding: 1.5rem;
    border-radius: 1.1rem;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .result-count {
    width: 100%;
    margin: 0.4rem 0 0;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 320px;
  }

  .notice-panel {
    grid-template-columns: 1fr;
    margin-bottom: 4rem;
    padding: 1.5rem;
  }

  .notice-state {
    grid-column: 1;
  }

  .site-footer {
    gap: 1rem;
    flex-direction: column;
  }

  .back-link {
    font-size: 0;
  }

  .back-link::before {
    font-size: 1rem;
  }

  .detail-account {
    display: none;
  }

  .tool-detail-shell {
    padding: 3rem 0 4rem;
  }

  .tool-detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .capability-section ul {
    grid-template-columns: 1fr;
  }

  .login-intro {
    padding: 1.5rem 1.4rem 3rem;
  }

  .login-intro > div {
    padding: 4.5rem 0 2.5rem;
  }

  .login-intro h1 {
    font-size: clamp(2.8rem, 15vw, 4.4rem);
  }

  .login-card {
    width: min(100% - 40px, 430px);
    margin: 3.5rem auto;
  }
}

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