/* Original tables remain the authoritative, accessible no-JavaScript fallback. */
#pagebody.imn-content {min-width:0;max-width:100%;box-sizing:border-box;}
#pagebody.imn-content .scrollable-table.imn-planet-responsive {display:block;width:100%;max-width:100%;min-width:0;overflow-x:auto;box-sizing:border-box;}
#pagebody.imn-content .imn-planet-data-table {min-width:796px;width:796px!important;max-width:none!important;height:auto!important;}
#pagebody.imn-content .imn-planet-research {display:none;min-width:0;max-width:100%;margin:1rem 0 2rem;color:#e8e3da;box-sizing:border-box;}
#pagebody.imn-content.imn-planet-research-ready .imn-planet-research {display:block;}
#pagebody.imn-content.imn-planet-research-ready .scrollable-table.imn-planet-responsive {display:none;}
#pagebody.imn-content .imn-planet-mode-tabs {display:flex;flex-wrap:wrap;gap:.5rem;margin:.5rem 0;}
#pagebody.imn-content .imn-planet-mode-button {appearance:none;border:1px solid #555;background:#1b1c1e;border-radius:6px;color:#e3dbce;padding:.65rem .85rem;font-size:.9rem;cursor:pointer;}
#pagebody.imn-content .imn-planet-mode-button[aria-pressed="true"] {border-color:#ab8c56;background:#383021;color:#fff0d0;}
#pagebody.imn-content .imn-planet-mode-button:focus-visible,#pagebody.imn-content select:focus-visible {outline:2px solid #d6b984;outline-offset:2px;}
#pagebody.imn-content .imn-planet-view-note {margin:.2rem 0 .8rem;font-size:.78rem;color:#b7b4af;}
#pagebody.imn-content .imn-planet-scroll-note[hidden] {display:none!important;}
#pagebody.imn-content .imn-planet-mode-panel[hidden] {display:none!important;}
#pagebody.imn-content .imn-planet-matrix-scroll {max-width:100%;min-width:0;overflow:auto;overscroll-behavior-x:contain;border:1px solid #635844;border-radius:8px;}
#pagebody.imn-content .imn-planet-matrix {width:max-content;min-width:100%;max-width:none!important;table-layout:auto;border-collapse:separate;border-spacing:0;background:#0c0c0c;font-size:.84rem;}
#pagebody.imn-content .imn-planet-matrix th,#pagebody.imn-content .imn-planet-matrix td {padding:.6rem .65rem;border-right:1px solid #37322b;border-bottom:1px solid #37322b;min-width:110px;max-width:260px;white-space:normal;overflow-wrap:anywhere;vertical-align:top;}
#pagebody.imn-content .imn-planet-matrix thead th {position:sticky;top:0;z-index:2;background:#30291e;color:#ead3a7;}
#pagebody.imn-content .imn-planet-matrix th:first-child {position:sticky;left:0;z-index:1;min-width:140px;background:#25221e;color:#e0c797;}
#pagebody.imn-content .imn-planet-matrix thead th:first-child {z-index:3;background:#30291e;}
#pagebody.imn-content .imn-planet-matrix-group th {background:#413526!important;color:#f3dab0!important;}
#pagebody.imn-content .imn-planet-filter label {display:block;color:#e5cd9e;font-size:.9rem;margin-bottom:.8rem;}
#pagebody.imn-content .imn-planet-field-select {display:block;max-width:100%;width:100%;margin-top:.4rem;border:1px solid #6c6253;border-radius:6px;padding:.6rem;background:#17191b;color:#f7f2e9;font-size:1rem;}
#pagebody.imn-content .imn-planet-compare-list,#pagebody.imn-content .imn-planet-card {background:#101113;border:1px solid #806a49;border-radius:9px;overflow:hidden;}
#pagebody.imn-content h2.imn-planet-compare-heading {font-size:1.05rem!important;line-height:1.5;margin:0!important;padding:.8rem!important;color:#e9cf9d;text-align:left;background:#201c17!important;border:0!important;}
#pagebody.imn-content h2.imn-planet-compare-heading::before,#pagebody.imn-content h2.imn-planet-compare-heading::after {display:none!important;content:none!important;}
#pagebody.imn-content .imn-planet-compare-row {display:grid;grid-template-columns:minmax(68px,23%) minmax(0,1fr);gap:.8rem;padding:.75rem .85rem;border-top:1px solid #383431;font-size:.91rem;overflow-wrap:anywhere;}
#pagebody.imn-content .imn-planet-compare-row strong {color:#d6ba85;}
#pagebody.imn-content .imn-planet-gallery {display:grid;grid-template-columns:minmax(0,1fr);gap:.65rem;}
#pagebody.imn-content .imn-planet-card-title {cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.8rem 1rem;color:#ead3a7;font-family:'Yu Mincho','Hiragino Mincho ProN',serif;font-size:1.16rem;}
#pagebody.imn-content .imn-planet-card-title::after {content:'＋';display:inline-block;margin-left:auto;flex:none;color:#bba06f;}
#pagebody.imn-content .imn-planet-card[open]>.imn-planet-card-title::after {content:'−';}
#pagebody.imn-content .imn-planet-card-title::-webkit-details-marker {display:none;}
#pagebody.imn-content .imn-planet-card-title::marker {content:'';}
#pagebody.imn-content .imn-planet-card-content {padding:.3rem 1rem 1rem;border-top:1px solid #5b4d36;}
#pagebody.imn-content .imn-planet-card-section {padding:.45rem 0;border-bottom:1px solid #423a30;}
#pagebody.imn-content .imn-planet-card-section h3 {margin:.4rem 0!important;padding:0!important;border:0!important;background:none!important;color:#d6b984;font-size:.95rem;text-align:left;}
#pagebody.imn-content .imn-planet-card-section h3::before,#pagebody.imn-content .imn-planet-card-section h3::after {content:none!important;display:none!important;}
#pagebody.imn-content .imn-planet-detail-list {display:grid;grid-template-columns:minmax(0,38%) minmax(0,1fr);gap:.5rem;margin:0;}
#pagebody.imn-content .imn-planet-detail-list dt,#pagebody.imn-content .imn-planet-detail-list dd {margin:0;font-size:.88rem;overflow-wrap:anywhere;}
#pagebody.imn-content .imn-planet-detail-list dt {color:#c4a97a;}
@media(max-width:760px){#pagebody.imn-content .article-toc {display:none!important;}#pagebody.imn-content .imn-planet-mode-button {flex:1;min-width:0;padding:.65rem .35rem;font-size:.82rem;}#pagebody.imn-content .imn-planet-matrix th,#pagebody.imn-content .imn-planet-matrix td {min-width:120px;}}

/* Correspondence-table redesign: monochrome black and white rather than gold/brown. */
#pagebody.imn-content .imn-planet-research,
#pagebody.imn-content .imn-planet-matrix,
#pagebody.imn-content .imn-planet-compare-list,
#pagebody.imn-content .imn-planet-card,
#pagebody.imn-content .imn-planet-matrix-scroll {background:#000!important;}
#pagebody.imn-content .imn-planet-matrix-scroll,
#pagebody.imn-content .imn-planet-compare-list,
#pagebody.imn-content .imn-planet-card {border:1px solid #fff!important;}
#pagebody.imn-content .imn-planet-matrix th,
#pagebody.imn-content .imn-planet-matrix td {border-right:1px solid #fff!important;border-bottom:1px solid #fff!important;color:#fff;background:#000;}
#pagebody.imn-content .imn-planet-matrix thead th,
#pagebody.imn-content .imn-planet-matrix th:first-child,
#pagebody.imn-content .imn-planet-matrix thead th:first-child,
#pagebody.imn-content .imn-planet-matrix-group th {background:#000!important;color:#fff!important;}
/* A narrow sticky label column gives the data columns more room. */
#pagebody.imn-content .imn-planet-matrix th:first-child {width:90px!important;min-width:90px!important;max-width:90px!important;white-space:normal;overflow-wrap:anywhere;}
#pagebody.imn-content .imn-planet-matrix th,
#pagebody.imn-content .imn-planet-matrix td {padding:.55rem .65rem;font-size:1rem;line-height:1.55;}
#pagebody.imn-content .imn-planet-matrix td {min-width:165px;max-width:320px;font-size:1.07rem;}
#pagebody.imn-content .imn-planet-matrix-group th {width:auto!important;max-width:none!important;text-align:left;border-bottom:1px solid #fff!important;}
#pagebody.imn-content .imn-planet-mode-button {border-color:#fff;background:#000;color:#fff;}
#pagebody.imn-content .imn-planet-mode-button[aria-pressed="true"] {background:#252525;border-color:#fff;color:#fff;}
#pagebody.imn-content .imn-planet-compare-row,
#pagebody.imn-content .imn-planet-card-content,
#pagebody.imn-content .imn-planet-card-section {border-color:#fff!important;}
#pagebody.imn-content .imn-planet-compare-row strong,
#pagebody.imn-content .imn-planet-card-title,
#pagebody.imn-content .imn-planet-card-title::after,
#pagebody.imn-content .imn-planet-card-section h3,
#pagebody.imn-content .imn-planet-detail-list dt {color:#fff!important;}
/* Remove the shared mystical mist from all h2 headings on this correspondence page. */
#pagebody.imn-content h2::before,#pagebody.imn-content h2::after {content:none!important;display:none!important;background-image:none!important;}
#pagebody.imn-content h2.imn-planet-compare-heading {color:#fff!important;background:#000!important;border-bottom:1px solid #fff!important;}
/* Short, dismissible selection list replaces the oversized native dropdown. */
#pagebody.imn-content .imn-planet-field-label {margin:0 0 .35rem;color:#fff;font-size:.95rem;}
#pagebody.imn-content .imn-planet-field-picker {position:relative;width:min(100%,360px);}
#pagebody.imn-content .imn-planet-field-trigger {width:100%;max-width:100%;text-align:left;padding:.48rem .7rem;border:1px solid #fff;border-radius:5px;background:#000;color:#fff;font-size:.96rem;cursor:pointer;}
#pagebody.imn-content .imn-planet-field-menu {position:absolute;z-index:15;left:0;top:calc(100% + 3px);width:100%;background:#000;border:1px solid #fff;border-radius:5px;padding:.35rem;box-shadow:0 6px 18px #000;box-sizing:border-box;}
#pagebody.imn-content .imn-planet-field-menu[hidden] {display:none!important;}
#pagebody.imn-content .imn-planet-field-menu-list {max-height:190px;overflow-y:auto;overscroll-behavior:contain;}
#pagebody.imn-content .imn-planet-field-group-label {font-size:.75rem;padding:.4rem .4rem .2rem;color:#bcbcbc;border-bottom:1px solid #777;}
#pagebody.imn-content .imn-planet-field-choice {display:block;width:100%;padding:.45rem .55rem;cursor:pointer;text-align:left;font-size:.9rem;color:#fff;background:#000;border:0;border-bottom:1px solid #555;}
#pagebody.imn-content .imn-planet-field-choice[aria-pressed="true"] {background:#303030;}
#pagebody.imn-content .imn-planet-field-cancel {display:block;width:100%;margin-top:.35rem;padding:.5rem .4rem;color:#fff;border:1px solid #fff;border-radius:4px;background:#1b1b1b;font-size:.88rem;cursor:pointer;}
#pagebody.imn-content .imn-planet-field-help {margin:.4rem 0 .75rem;font-size:.78rem;color:#c6c6c6;line-height:1.5;}
#pagebody.imn-content .imn-planet-field-trigger:focus-visible,
#pagebody.imn-content .imn-planet-field-choice:focus-visible,
#pagebody.imn-content .imn-planet-field-cancel:focus-visible {outline:2px solid #fff;outline-offset:2px;}
@media(max-width:760px){#pagebody.imn-content .imn-planet-matrix th:first-child {min-width:90px!important;max-width:90px!important;}}
/* Canonical four tables also use monochrome styling when JS is disabled. */
#pagebody.imn-content .imn-planet-data-table {background:#000!important;color:#fff!important;}
#pagebody.imn-content .imn-planet-data-table th,
#pagebody.imn-content .imn-planet-data-table td {background:#000!important;color:#fff!important;border:1px solid #fff!important;}
#pagebody.imn-content h2 {background-image:none!important;}

/* Keep each group heading centered in the VISIBLE comparison-table viewport.
   The spanning th scrolls with the table; the inner sticky label stays pinned
   to the left edge of the scrollport and has the scrollport's width. */
#pagebody.imn-content .imn-planet-matrix-group th {padding:0!important;position:static!important;}
#pagebody.imn-content .imn-planet-matrix-group-label {
  position:sticky;left:0;display:block;box-sizing:border-box;
  width:var(--imn-matrix-visible-width, 100%);max-width:100%;
  margin:0;padding:.7rem .5rem;text-align:center;
  font-size:1rem;font-weight:700;line-height:1.4;
  color:#fff;background:#000;
}

/* Export link remains visible in all three modes. */
#pagebody.imn-content .imn-planet-export-link a{display:inline-block;border:1px solid #fff;border-radius:5px;padding:.55rem .75rem;color:#fff;background:#000;text-decoration:none;}

/* Upper horizontal scrollbar: visible and draggable on touch screens even when
   platform-native overflow scrollbars are hidden (Android/iOS). */
#pagebody.imn-content .imn-planet-top-scroll {
  display:flex;align-items:center;gap:.45rem;margin:.5rem 0 .3rem;
  padding:.38rem .6rem;border:1px solid #fff;border-radius:6px;
  background:#000;color:#fff;box-sizing:border-box;max-width:100%;
  touch-action:pan-y;
}
#pagebody.imn-content .imn-planet-top-scroll-arrow {
  font-size:.72rem;line-height:1;flex:none;color:#fff;
}
#pagebody.imn-content input.imn-planet-top-scroll-range {
  appearance:none;-webkit-appearance:none;display:block;flex:1;
  width:100%;min-width:0;height:7px;margin:0;padding:0;
  background:#555;border:1px solid #fff;border-radius:999px;
  cursor:ew-resize;touch-action:none;
}
#pagebody.imn-content input.imn-planet-top-scroll-range::-webkit-slider-thumb {
  appearance:none;-webkit-appearance:none;width:34px;height:18px;
  border:2px solid #000;border-radius:5px;background:#fff;
  box-shadow:0 0 0 1px #fff;cursor:grab;
}
#pagebody.imn-content input.imn-planet-top-scroll-range::-moz-range-thumb {
  width:34px;height:18px;border:2px solid #000;border-radius:5px;
  background:#fff;box-shadow:0 0 0 1px #fff;cursor:grab;
}
#pagebody.imn-content input.imn-planet-top-scroll-range:focus-visible {
  outline:2px solid #fff;outline-offset:5px;
}
#pagebody.imn-content .imn-planet-top-scroll-inactive {opacity:.5;}

/* Planet and Sephirot unit cards: no horizontal dividers inside expanded content.
   Keep the outer white card frame; use whitespace to separate the sections. */
#pagebody.imn-content .imn-planet-card-content {border-top:0!important;}
#pagebody.imn-content .imn-planet-card-section {border-bottom:0!important;}

/* Unit display: the former source-table section titles are redundant in each
   expanded card.  Present every correspondence as a compact two-column table. */
#pagebody.imn-content .imn-planet-card-content {
  padding:.65rem .7rem .85rem!important;
}
#pagebody.imn-content .imn-planet-card-section {
  margin:0!important;padding:0!important;border:0!important;
}
#pagebody.imn-content .imn-planet-card-section h3 {display:none!important;}
#pagebody.imn-content .imn-planet-card-content .imn-planet-detail-list {
  display:grid!important;grid-template-columns:minmax(0,36%) minmax(0,64%);
  gap:0!important;margin:0!important;padding:0!important;
  border-top:1px solid #fff;border-left:1px solid #fff;
  background:#000!important;
}
#pagebody.imn-content .imn-planet-card-content .imn-planet-detail-list dt,
#pagebody.imn-content .imn-planet-card-content .imn-planet-detail-list dd {
  box-sizing:border-box;min-width:0;margin:0!important;padding:.5rem .55rem!important;
  border-right:1px solid #fff!important;border-bottom:1px solid #fff!important;
  color:#fff!important;background:#000!important;
  font-size:.9rem;line-height:1.55;overflow-wrap:anywhere;
}
#pagebody.imn-content .imn-planet-card-content .imn-planet-detail-list dt {
  font-weight:600;background:#171717!important;
}
/* Consecutive source groups behave like one uninterrupted table. */
#pagebody.imn-content .imn-planet-card-section + .imn-planet-card-section .imn-planet-detail-list {
  border-top:0;
}
@media(max-width:420px){
  #pagebody.imn-content .imn-planet-card-content .imn-planet-detail-list{grid-template-columns:minmax(0,40%) minmax(0,60%);}
  #pagebody.imn-content .imn-planet-card-content .imn-planet-detail-list dt,
  #pagebody.imn-content .imn-planet-card-content .imn-planet-detail-list dd{padding:.43rem .4rem!important;font-size:.84rem;}
}
