* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
    color: #000;
}

/* =========================
   Header
   ========================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #000;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;

    display: flex;
    align-items: center;
    height: 64px;

    
}

.logo {
    font-weight: 700;
    text-decoration: none;
    color: #000;
    margin-right: 40px;
    white-space: nowrap;

    display: flex;
    align-items: center;
    height: 100%;
}

.nav-main {
    display: flex;
    gap: 28px;
    height: 100%;
}

.nav-main a {
    display: flex;
    align-items: center;
    height: 100%;

    padding: 0 12px;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    white-space: nowrap;

    transition: background 0.15s ease, color 0.15s ease;
}

.nav-main a:hover {
    background: #000;
    color: #fff;
}

/* =========================
   Dropdown
   ========================= */

.dropdown {
    position: relative;
    height: 100%;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1px); /* ← 境界線と干渉しない */
    left: 0;

    display: none;
    flex-direction: column;

    background: #fff;
    z-index: 1000;
}

.dropdown-menu a {
    padding: 8px 12px;
    font-size: 0.85rem;
    text-decoration: none;
    color: #000;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #000;
    color: #fff;
}

.dropdown:hover .dropdown-menu {
    display: flex;
}

/* =========================
   Layout
   ========================= */

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 28px;
}

/* =========================
   Hero
   ========================= */

.hero {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 60px 0;
}

.hero-logo img {
    width: 140px;
    height: auto;
    opacity: 0.9;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 650px;
}

/* =========================
   Typography
   ========================= */

h1 {
    font-size: 2.4rem;
    margin-bottom: 20px;
}

p {
    line-height: 1.6;
    margin-bottom: 24px;
}

/* =========================
   Button
   ========================= */

.button,
button {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.button:hover,
button:hover {
    opacity: 0.85;
}

.button-outline {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 12px 24px;
    text-decoration: none;
}

.button-outline:hover {
    background: #000;
    color: #fff;
}

/* =========================
   Ads
   ========================= */

.ad-container {
    max-width: 960px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

/* =========================
   Footer
   ========================= */

footer {
    border-top: 1px solid #000;
    padding: 24px;
    text-align: center;
}

.footer-main {
    font-size: 0.9rem;
}

.footer-sub {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* =========================
   Cookie banner
   ========================= */

#cookie-banner{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  padding: 24px;
}

.cookie-card{
  width: min(640px, 100%);
  background: #fff;
  color: #111;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}

.cookie-card p{
  margin: 0 0 16px 0;
  line-height: 1.5;
  font-size: 16px;
}

.cookie-actions{
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cookie-actions button{
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.cookie-actions button.secondary{
  background: #fff;
  color: #111;
}





.page-section {
    margin-bottom: 64px;
}

.page-section h2 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.page-section ul {
    padding-left: 20px;
    line-height: 1.6;
}


.publication-note {
    margin-top: 40px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.publication-note a {
    text-decoration: none;
    border-bottom: 1px solid #000;
    color: #000;
}

.publication-note a:hover {
    background: #000;
    color: #fff;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.tool-card {
    border: 1px solid #000;
    transition: border-width 0.15s ease, transform 0.15s ease;
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    color: #000;
}

.tool-card img {
    height: 70px;
    margin-bottom: 16px;
}

.tool-card span {
    display: block;
    font-weight: 500;
}

.tool-card:hover {
    border-width: 2px;
    transform: translateY(-2px);
}



/* Magazine */
.simple-list {
    padding-left: 20px;
    line-height: 1.8;
}
.article-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.article-item {
    text-decoration: none;
    color: #000;
    border-bottom: 1px solid #000;
    padding-bottom: 4px;
    transition: opacity 0.15s ease;
}
.article-item:hover {
    opacity: 0.6;
}


/* ===============================
   Mass Informatics
   =============================== */
.spectra-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
}

.spectra-box {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.spectra-label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

textarea {
    width: 100%;
    min-height: 140px;
    padding: 14px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
}

textarea:focus {
    border-color: #000;
    outline: none;
}

.mirror-divider {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
    margin: 10px 0 20px 0;
}

.button-group {
    margin-top: 20px;
}
/* ===============================
   MS/MS Spectral Matching Page
   =============================== */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Title hierarchy */

.container h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.container h2 {
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 28px;
}

/* ===== Spectra Input Area ===== */

.spectra-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.spectra-box {
    border: 1px solid #000;
    padding: 16px;
    background: #fff;
}

.spectra-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.spectra-box textarea {
    width: 100%;
    min-height: 130px;
    font-family: monospace;
    font-size: 0.95rem;
    padding: 12px;
    border: 1px solid #000;
    resize: vertical;
}

/* Mirror divider */

.mirror-divider {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    padding: 6px 0;
}

/* Buttons */

.button-group {
    margin-bottom: 16px;
}

.button-group button {
    margin-right: 12px;
}

/* Response */

#response {
    margin: 12px 0;
    font-weight: 500;
}

/* ===== Explanation Section ===== */

.parent-container {
    display: flex;
    justify-content: center;
    margin: 60px 0;
}

.rectangle {
    border: 1px solid #000;
    background: #fff;
    line-height: 1.6;
}

.rectangle h2 {
    font-size: 1.2rem;
    margin-bottom: 18px;
}

.rectangle p {
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.rectangle code {
    background: #f5f5f5;
    padding: 2px 6px;
    font-size: 0.9rem;
}


/* ===============================
   MS Spectral PPT
   =============================== */

.tool-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px;
}

.tool-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

.spectra-box-single {
    margin-bottom: 24px;
}

.spectra-box-single label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.spectra-box-single textarea {
    width: 100%;
    height: 160px;
    font-family: monospace;
}

.info-box {
    max-width: 900px;
    margin: 60px auto;
    padding: 32px;
    border: 1px solid #000;
    background: #fff;
}


/* Massinformatics pocket note */
.tool-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 28px 30px;
}

.tool-subtitle {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 750px;
}

.info-box {
    max-width: 900px;
    margin: 40px auto;
    padding: 28px;
    border: 1px solid #000;
}

.info-box h2 {
    margin-top: 0;
    margin-bottom: 20px;
}
.pocket-table {
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.95rem;
}

.pocket-table thead {
    background: #111;
    color: #fff;
}

.pocket-table th,
.pocket-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
}

.pocket-table tbody tr:nth-child(even) {
    background: #f7f7f7;
}

.pocket-table tbody tr:hover {
    background: #eee;
}

.pocket-table caption {
    text-align: left;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 1.05rem;
}


/* ADUCT */
.adduct-section {
    text-align: center;
    margin: 40px auto;
    max-width: 900px;
}

.adduct-subtitle {
    font-size: 16px;
    margin-bottom: 25px;
    color: #444;
}

.adduct-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.adduct-input-group {
    margin-bottom: 20px;
}

.adduct-input-row input {
    width: 200px;
    margin: 5px;
}

.adduct-result-box {
    margin-top: 20px;
}

.adduct-result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.adduct-result-table th {
    background: #353535;
    color: white;
    padding: 10px;
}

.adduct-result-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.adduct-result-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.adduct-button-group button {
    margin: 8px;
}


/* =========================
   Responsive (Mobile)
   ========================= */

@media (max-width: 768px) {

    .adduct-section {
        padding: 0 16px;
    }

    .adduct-box {
        padding: 20px;
    }

    .adduct-input-row {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .adduct-input-row input {
        width: 100%;
        max-width: 320px;
    }

    .adduct-button-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .adduct-button-group button {
        width: 100%;
        max-width: 320px;
    }

    .adduct-result-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}


/* ===============================
   g ↔ mL Converter ONLY
   =============================== */

.gml-section .adduct-box {
    padding: 24px;
}

.gml-section input,
.gml-section select {
    height: 50px;
    font-size: 1rem;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* 横並び */
.gml-section .adduct-input-row {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

/* 数値入力広く */
.gml-section .adduct-input-row input {
    flex: 2;
}

/* 単位select狭く */
.gml-section .adduct-input-row select {
    flex: 1;
    min-width: 110px;
}

/* density full width */
.gml-section .adduct-input-group input {
    width: 100%;
}

/* ボタン統一 */
.gml-section .adduct-button-group {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.gml-section .adduct-button-group button {
    flex: 1;
    height: 50px;
    font-size: 1rem;
}

/* Result spacing */
.gml-section .adduct-result-box {
    margin-top: 16px;
    font-size: 1rem;
}

/* スマホ最適化 */
@media (max-width: 640px) {

    .gml-section .adduct-input-row {
        flex-direction: column;
    }

    .gml-section .adduct-button-group {
        flex-direction: column;
    }

    .gml-section .adduct-button-group button {
        width: 100%;
    }
}


/* ===============================
   Exact Mass Calculator ONLY
   =============================== */

.exmc-section textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
}

.exmc-section .adduct-result-box {
    margin-top: 12px;
    font-weight: 500;
    font-size: 1rem;
}

@media (max-width: 640px) {

    .exmc-section .adduct-button-group {
        flex-direction: column;
    }

    .exmc-section .adduct-button-group button {
        width: 100%;
    }
}


#info-box {
  position: fixed;
  top: 120px;
  right: 30px;
  width: 300px;
  background: #ffffff;
  border: 2px solid #333;
  border-radius: 10px;
  padding: 15px;
  text-align: left;
  font-family: monospace;
  z-index: 999;
}


/* ===== GEL PAGE ONLY ===== */

.gel-page {
  font-family: 'Arial', sans-serif;
  background-color: #f4f4f4;
  text-align: center;
}

.gel-header {
  width: 100%;
  height: 60px;
  background-color: #353535;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.gel-title {
  color: #ffffff;
  font-size: 24pt;
  font-weight: bold;
  margin: 0;
}

.gel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.gel-image-wrapper {
  position: relative;
  max-width: 500px;
  margin: 20px auto;
}

.gel-image {
  width: 100%;
  border: 1px solid #ccc;
  display: block;
}

.gel-start-line {
  position: absolute;
  height: 4px;
  width: 100%;
  background: blue;
  cursor: ns-resize;
}

.gel-start-label {
  position: absolute;
  left: 0;
  top: -20px;
  background: white;
  color: blue;
  font-weight: bold;
  font-size: 12px;
  padding: 0 4px;
}

.gel-marker-wrapper,
.gel-sample-wrapper {
  position: absolute;
  left: 0;
  width: 100%;
  cursor: grab;
}

.gel-line-segment {
  height: 3px;
  width: 100%;
  background-color: #007bff;
}

.gel-sample-wrapper .gel-line-segment {
  background-color: #c14242;
}

.gel-box {
  position: absolute;
  left: calc(100% + 5px);
  width: 70px;
  height: 24px;
  background: #cfe2ff;
  border: 1px solid black;
  text-align: center;
  font-size: 13px;
  color: #000;
}

.gel-sample-box {
  background: #f3d9d9;
}

.gel-info-box {
  max-width: 600px;
  width: 100%;
  background-color: #fff;
  color: #333;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  border: 2.5px solid black;
  padding: 20px;
  margin: 30px auto;
}
.gel-button-row {
  display: flex;
  justify-content: center;
  gap: 15px;            /* ← ボタン間の距離 */
  margin-top: 20px;
  flex-wrap: wrap;      /* ← スマホでは折り返す */
}

.gel-button-row .btn {
  min-width: 160px;     /* ボタン幅を揃える */
}
/* ===== GEL Description Box ===== */

.gel-description-box {
  max-width: 700px;
  width: 100%;
  background-color: #ffffff;
  color: #333;
  border: 2px solid #000;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  padding: 25px;
  margin: 40px auto;
  text-align: left;
  line-height: 1.7;
  border-radius: 6px;
}

.gel-description-box h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

.gel-description-box p {
  font-size: 15px;
  margin-bottom: 14px;
}



/* ===== HCA Download Button ===== */

.download-button {
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  transition: all 0.2s ease;
}

.download-button:hover {
  background-color: #000000;
  color: #ffffff;
}



/* RES */
/* ===== RSE only ===== */
/* ===== RSE only refined ===== */

/* ===== RSE only refined ===== */

.rse-timeline-wrapper{
   width: 100vw;
   margin-left:calc(50% - 50vw);
  height:750px;
  overflow:auto;
  border:1px solid #e5e5e5;
  background:#fafafa;
  cursor:grab;
  position:relative;

  scrollbar-width:none; /* Firefox */
}

.rse-timeline-wrapper::-webkit-scrollbar{
  display:none; /* Chrome */
}

.rse-timeline{
  position:absolute;
  width:2000px;
  height:1400px;
  left:0;
  top:0;
}

/* ===== Central Axis ===== */

/* .rse-line{
  position:absolute;
  left:0;
  width:100%;
  height:3px;
  background:#111;
  box-shadow:0 0 0 1px rgba(0,0,0,0.05);
} */
.rse-line{
  position:absolute;
  left:0;
  right:0;   /* ← これ追加 */
  height:3px;
  background:#111;
}

/* ===== Year ticks ===== */

.rse-year-tick{
  position:absolute;
  width:2px;
  background:#000;
  top:0;
  height:100%;
  opacity:0.06;
}

.rse-year-label{
  position:absolute;
  top:50%;
  transform:translate(-50%,-50%);
  font-size:11px;
  font-weight:600;
  background:#fff;
  padding:3px 8px;
  border-radius:20px;
  border:1px solid #ddd;
  letter-spacing:0.5px;
  color:#333;
}

/* ===== Cards ===== */

.rse-item{
  position:absolute;
  width:220px;
  transform:translateX(-50%);
}

.rse-card{
  position:relative;
  background:#fff;
  border:1.5px solid #111;
  padding:12px 30px 12px 12px;
  box-sizing:border-box;
  border-radius:8px;
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
  transition:all 0.15s ease;
}

.rse-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(0,0,0,0.12);
}

.rse-card.rse-own{
  border-color:#007bff;
  background:#f4f9ff;
}

/* ===== Text ===== */

.rse-date{
  font-weight:700;
  font-size:13px;
  color:#111;
}

.rse-title{
  font-weight:600;
  font-size:14px;
  margin-top:4px;
  word-break:break-word;
}

.rse-comment{
  font-size:12px;
  margin-top:6px;
  color:#555;
  line-height:1.4;
  word-break:break-word;
}

/* ===== Delete button ===== */

.rse-del{
  position:absolute;
  top:8px;
  right:8px;
  width:18px;
  height:18px;
  line-height:18px;
  text-align:center;
  background:#111;
  color:#fff;
  font-size:11px;
  border-radius:4px;
  cursor:pointer;
  opacity:0.7;
  transition:opacity 0.15s ease;
}

.rse-del:hover{
  opacity:1;
}

/* ===== Connector ===== */

.rse-connector{
  position:absolute;
  left:50%;
  width:2px;
  background:#000;
  opacity:0.15;
  transform:translateX(-50%);
}


.rse-guide{
  max-width:900px;
  margin:20px auto;
  padding:12px 16px;
  background:#f9f9f9;
  border:1px solid #e5e5e5;
  border-radius:8px;
  font-size:13px;
  color:#444;
}

.rse-guide summary{
  cursor:pointer;
  font-weight:600;
  font-size:14px;
  color:#111;
  outline:none;
}

.rse-guide summary::-webkit-details-marker{
  display:none; /* デフォルト三角消す */
}

.rse-guide summary::after{
  content:"＋";
  float:right;
  transition:transform 0.2s ease;
}

.rse-guide[open] summary::after{
  content:"−";
}



/* =========================
   Sponsor Ad
   ========================= */

.bcc-sponsor {
    width: 100%;
    max-width: 900px;
    margin: 24px auto 40px;
}

.bcc-sponsor-link {
    display: block;
    text-decoration: none;
    color: #000;
}

.bcc-sponsor-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.65;
}

.bcc-sponsor-image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #000;
    background: #fff;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.bcc-sponsor-link:hover .bcc-sponsor-image {
    opacity: 0.9;
    transform: translateY(-1px);
}


.license-text {
  border: 1px solid #000;
  padding: 24px;
  background: #fff;
}

.license-text pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}