:root {
  color-scheme: light;
  --ink: #252933;
  --muted: #77746f;
  --panel: #fff;
  --line: #e4e2dc;
  --soft: #f8f7f4;
  --rail: #1e2430;
  --rail-active: #2f3a4d;
  --accent: oklch(0.58 0.14 12);
  --accent-soft: oklch(0.95 0.035 12);
}

* { box-sizing: border-box; }

html,
body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: #f4f3f0;
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  font-size: 13px;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(rgba(244, 243, 240, .58), rgba(244, 243, 240, .58)),
    url("assets/site/bg.webp") center / cover no-repeat;
  content: "";
}

a { color: inherit; text-decoration: none; }

.hub-shell {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  width: min(1320px, 100%);
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--panel);
}

.hub-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 14px 10px;
  background: var(--rail);
}

.hub-logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0 auto;
}

.hub-logo img {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.rail-links { display: grid; gap: 7px; }

.rail-link {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 60px;
  padding: 8px 3px;
  border-radius: 8px;
  color: #b9c1cc;
  font-size: 10px;
}

.rail-link img {
  width: 25px;
  height: 25px;
  filter: invert(83%) sepia(8%) saturate(293%) hue-rotate(177deg) brightness(90%);
}

.rail-link:hover,
.rail-link.active {
  background: var(--rail-active);
  color: #fff;
}

.rail-link:hover img,
.rail-link.active img { filter: brightness(0) invert(1); }

.visitor-counter {
  margin-top: auto;
  color: #8d96a3;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.hub-main {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 72px minmax(0, 1fr);
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}

.site-kicker,
.section-label {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
}

.hub-header h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.hub-content {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px 18px;
}

.content-section { padding: 8px 8px 4px; }

.content-section + .content-section { padding-top: 34px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
}

.tool-card {
  display: grid;
  grid-template-columns: 164px minmax(330px, 1fr) 32px;
  align-items: center;
  width: min(680px, 100%);
  min-height: 152px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tool-visual {
  align-self: stretch;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(232, 242, 250, .74), rgba(255,255,255,.9)),
    url("assets/site/bg.webp") center / cover;
}

.tool-avatar {
  display: block;
  width: 118px;
  height: 118px;
  object-fit: contain;
  image-rendering: pixelated;
}

.tool-copy { padding: 18px 24px; }

.tool-copy h3 {
  margin: 0 0 5px;
  font-size: 19px;
}

.tool-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.card-arrow {
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.database-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.database-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 13px;
}

.database-card.pending { color: #97938c; }

.database-card.available {
  position: relative;
  background: #fff;
}

.database-card.available:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.database-card.available .database-icon {
  border-color: #b9d9c2;
  background: #e7f4ea;
}

.database-card.available .database-icon img { opacity: .9; }

.database-arrow {
  width: 15px;
  height: 15px;
  margin-left: auto;
  opacity: .65;
}

.database-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid #e2dfd8;
  border-radius: 7px;
  background: #fff;
}

.database-icon img {
  width: 20px;
  height: 20px;
  opacity: .6;
}

.database-card h3,
.database-card p { margin: 0; }
.database-card h3 { color: #65645f; font-size: 13px; }
.database-card p { margin-top: 4px; font-size: 10px; }

.hub-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  color: #aaa49b;
  padding: 16px 8px 2px;
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.hub-footer p { margin: 0; }

.database-page { padding-top: 18px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9a958d;
  font-size: 11px;
}

.breadcrumb a:hover { color: var(--accent); }

.page-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 24px 0 18px;
}

.page-heading h2 { margin: 0; font-size: 23px; }

.page-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid oklch(0.82 0.06 12);
  border-radius: 8px;
  background: var(--accent-soft);
}

.page-icon img { width: 23px; height: 23px; }

.experience-layout {
  display: block;
}

.table-panel {
  min-width: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.table-toolbar {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 14px 18px;
}

.table-toolbar h3,
.table-toolbar p { margin: 0; }
.table-toolbar h3 { font-size: 14px; }
.table-toolbar p { margin-top: 4px; color: var(--muted); font-size: 11px; }

.table-scroll { overflow-x: auto; }

.experience-body {
  display: grid;
  grid-template-columns: minmax(0, 560px) 300px;
  align-items: start;
  justify-content: start;
  gap: 16px;
}

.experience-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  padding: 10px 18px;
  scrollbar-width: thin;
}

.experience-tab {
  min-height: 32px;
  flex: 0 0 auto;
  border: 1px solid #dedbd4;
  border-radius: 6px;
  background: #fff;
  color: #69655f;
  padding: 0 12px;
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.experience-tab:hover { border-color: var(--accent); }

.experience-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  height: 43px;
  border-top: 1px solid var(--line);
  padding: 0 18px;
  text-align: right;
}

th {
  background: var(--soft);
  color: #6e6a64;
  font-size: 11px;
  font-weight: 600;
}

th:first-child,
td:first-child { width: 20%; text-align: left; }

tbody th {
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}

tbody tr:hover th,
tbody tr:hover td { background: #fcfbf9; }

.empty-table-row td {
  height: 180px;
  color: #a39e96;
  text-align: center;
}

.calculator-panel {
  position: sticky;
  top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.calculator-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.calculator-heading h3 { margin: 0; font-size: 15px; }

.calculator-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid oklch(0.82 0.06 12);
  border-radius: 7px;
  background: var(--accent-soft);
}

.calculator-icon img { width: 19px; height: 19px; }

.calculator-fields { display: grid; gap: 12px; }

.calculator-fields label {
  display: grid;
  gap: 5px;
  color: #77726b;
  font-size: 11px;
}

.calculator-fields select,
.calculator-fields input {
  width: 100%;
  height: 36px;
  border: 1px solid #dedbd4;
  border-radius: 7px;
  background: #faf9f7;
  color: var(--ink);
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
}

.calculator-fields select:focus,
.calculator-fields input:focus {
  outline: 2px solid oklch(0.8 0.06 12);
  border-color: var(--accent);
}

.calculator-level-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calculator-result {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  background: var(--accent-soft);
  padding: 14px;
}

.calculator-result > span {
  display: block;
  color: #7e756f;
  font-size: 10px;
}

#requiredExperience {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 23px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.calculator-result p {
  margin: 7px 0 0;
  color: #817b74;
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 1040px) {
  .experience-body { grid-template-columns: 1fr; }
  .calculator-panel { position: static; order: -1; }
}

@media (max-width: 800px) {
  .hub-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .hub-rail { padding-inline: 7px; }
  .rail-link { min-height: 54px; font-size: 9px; }
  .rail-link img { width: 22px; height: 22px; }
  .hub-header { padding-inline: 20px; }
  .hub-content { padding: 18px 18px 14px; }
  .database-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .hub-shell { grid-template-columns: 60px minmax(0, 1fr); }
  .hub-rail { gap: 12px; padding: 10px 5px; }
  .hub-logo,
  .hub-logo img { width: 28px; height: 28px; }
  .rail-links { gap: 4px; }
  .rail-link { min-height: 48px; gap: 3px; padding-inline: 1px; font-size: 8px; }
  .rail-link img { width: 19px; height: 19px; }
  .visitor-counter { font-size: 9px; }
  .hub-main { grid-template-rows: 62px minmax(0, 1fr); }
  .hub-header { padding-inline: 14px; }
  .hub-header h1 { font-size: 17px; }
  .site-kicker { font-size: 7px; }
  .hub-content { padding: 12px; }
  .content-section { padding: 8px 0 2px; }
  .content-section + .content-section { padding-top: 27px; }
  .tool-card { grid-template-columns: 96px minmax(0, 1fr) 24px; width: 100%; min-height: 128px; }
  .tool-copy { padding: 14px; }
  .tool-copy h3 { font-size: 15px; }
  .tool-copy p { font-size: 11px; line-height: 1.6; }
  .tool-avatar { width: 84px; height: 84px; }
  .database-grid { grid-template-columns: 1fr; gap: 8px; }
  .database-card { min-height: 66px; }
  .database-page { padding-top: 14px; }
  .page-heading { margin-top: 19px; }
  .page-heading h2 { font-size: 20px; }
}
