/* 
########################################

    style_add.css 
    
    　- 前半ＰＣをベースにスマホ共用
       - 後半スマホ o.w.  

########################################
*/
/*
  Josh W. Comeau's Custom CSS Reset
  www.joshwcomeau.com
*/
*, *::before, *::after { box-sizing: border-box;}
* {  margin: 0; padding: 0; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased;}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word;}
#root, #__next { isolation: isolate;}



/* base
------------------------------------------------------ */

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
/*  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;*/

  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  
  color: #222;
}
h1 {
    padding-bottom: 5px;
    border-bottom: solid 1px #555;
}

input:not([type=submit]):not([type=button]):not([type=reset]) {

    width: 100%;
    padding: 10px 12px;

    border: solid 1px #999;
    border-radius: 8px;

    background: #fff;
    color: #222;

    box-sizing: border-box;

    appearance: none;
    -webkit-appearance: none;
}
input:not([type=submit]):not([type=button]):not([type=reset]):focus {

    outline: none;

    border-color: #13A467;

    box-shadow:
      0 0 0 3px rgba(19,164,103,0.15);
}
select {
    padding: 0.3em 0.6em;
}
#main{
    display:flex;
    max-width:1200px;
    min-height:calc(100vh - 60px);
    margin:0 auto;
    background:url(../img/body_bg2.jpg) repeat-y #fff top center;
}
#short-msg {
    display: inline-block;
    font-size: 90%;
    color: #18A228;
    opacity:0;
    transition:opacity 0.2s; 
}

pre { display:none; } /*for debug */





/* utilily
------------------------------------------------------ */

.alC { text-align: center; }
.alL { text-align: left; }
.alR { text-align: right; }

.bold { font-weight: bold; }

.crimson { color: crimson;}

.inline-block { display: inline-block;}

.small { font-size:0.9rem;}

.m5  { margin: 5px; }
.m10 { margin: 10px; }
.m15 { margin: 15px; }
.m20 { margin: 20px; }
.m25 { margin: 25px; }
.m30 { margin: 30px; }
.m35 { margin: 35px; }
.m40 { margin: 40px; }
.m45 { margin: 45px; }
.m50 { margin: 50px; }

.p5  { padding: 5px; }
.p10 { padding: 10px; }
.p15 { padding: 15px; }
.p20 { padding: 20px; }
.p25 { padding: 25px; }
.p30 { padding: 30px; }
.p35 { padding: 35px; }
.p40 { padding: 40px; }
.p45 { padding: 45px; }
.p50 { padding: 50px; }


/* margin-top */
.mt5  { margin-top: 5px; }
.mt10 { margin-top: 10px; }
.mt15 { margin-top: 15px; }
.mt20 { margin-top: 20px; }
.mt25 { margin-top: 25px; }
.mt30 { margin-top: 30px; }
.mt35 { margin-top: 35px; }
.mt40 { margin-top: 40px; }
.mt45 { margin-top: 45px; }
.mt50 { margin-top: 50px; }

/* margin-right */
.mr5  { margin-right: 5px; }
.mr10 { margin-right: 10px; }
.mr15 { margin-right: 15px; }
.mr20 { margin-right: 20px; }
.mr25 { margin-right: 25px; }
.mr30 { margin-right: 30px; }
.mr35 { margin-right: 35px; }
.mr40 { margin-right: 40px; }
.mr45 { margin-right: 45px; }
.mr50 { margin-right: 50px; }

/* margin-bottom */
.mb5  { margin-bottom: 5px; }
.mb10 { margin-bottom: 10px; }
.mb15 { margin-bottom: 15px; }
.mb20 { margin-bottom: 20px; }
.mb25 { margin-bottom: 25px; }
.mb30 { margin-bottom: 30px; }
.mb35 { margin-bottom: 35px; }
.mb40 { margin-bottom: 40px; }
.mb45 { margin-bottom: 45px; }
.mb50 { margin-bottom: 50px; }

/* margin-left */
.ml5  { margin-left: 5px; }
.ml10 { margin-left: 10px; }
.ml15 { margin-left: 15px; }
.ml20 { margin-left: 20px; }
.ml25 { margin-left: 25px; }
.ml30 { margin-left: 30px; }
.ml35 { margin-left: 35px; }
.ml40 { margin-left: 40px; }
.ml45 { margin-left: 45px; }
.ml50 { margin-left: 50px; }

/* padding-top */
.pt5  { padding-top: 5px; }
.pt10 { padding-top: 10px; }
.pt15 { padding-top: 15px; }
.pt20 { padding-top: 20px; }
.pt25 { padding-top: 25px; }
.pt30 { padding-top: 30px; }
.pt35 { padding-top: 35px; }
.pt40 { padding-top: 40px; }
.pt45 { padding-top: 45px; }
.pt50 { padding-top: 50px; }

/* padding-right */
.pr5  { padding-right: 5px; }
.pr10 { padding-right: 10px; }
.pr15 { padding-right: 15px; }
.pr20 { padding-right: 20px; }
.pr25 { padding-right: 25px; }
.pr30 { padding-right: 30px; }
.pr35 { padding-right: 35px; }
.pr40 { padding-right: 40px; }
.pr45 { padding-right: 45px; }
.pr50 { padding-right: 50px; }

/* padding-bottom */
.pb5  { padding-bottom: 5px; }
.pb10 { padding-bottom: 10px; }
.pb15 { padding-bottom: 15px; }
.pb20 { padding-bottom: 20px; }
.pb25 { padding-bottom: 25px; }
.pb30 { padding-bottom: 30px; }
.pb35 { padding-bottom: 35px; }
.pb40 { padding-bottom: 40px; }
.pb45 { padding-bottom: 45px; }
.pb50 { padding-bottom: 50px; }

/* padding-left */
.pl5  { padding-left: 5px; }
.pl10 { padding-left: 10px; }
.pl15 { padding-left: 15px; }
.pl20 { padding-left: 20px; }
.pl25 { padding-left: 25px; }
.pl30 { padding-left: 30px; }
.pl35 { padding-left: 35px; }
.pl40 { padding-left: 40px; }
.pl45 { padding-left: 45px; }
.pl50 { padding-left: 50px; }


@media screen and (max-width: 900px) {
    .alC-sp { text-align: center !important; }
}





/* header
------------------------------------------------------ */
.member-header {
    max-width:1200px;
    margin:0 auto;
    padding: 10px 15px 10px 0;
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.header-right {
    display:flex;
    align-items:center;
    gap:3px;
    flex-wrap:nowrap;
}
.header-right a {
    display:block;
    flex-shrink:0;

    transition:
      transform 0.15s ease,
      opacity 0.15s ease,
      filter 0.15s ease;
}

.header-right a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    filter: brightness(1.08);
}
.header-right a img {
    display:block;
    height:30px;
    width:auto;
}


.top-right-actions {
    text-align: right;
}
.top-right-actions button {
    margin-left: 12px;
}




/* left
------------------------------------------------------ */

.member-left{
    width: 220px;
    min-width: 220px;
    flex: 0 0 220px;
    box-sizing: border-box;
    
    margin: 15px;
    padding:28px 20px;

background:
    linear-gradient(
        180deg,
        rgba(225,228,232,0.82) 0%,
        rgba(205,210,215,0.76) 100%
    );

    box-shadow:8px 0 24px rgba(0,0,0,0.06);
}

.member-nav {
    display:flex;
    flex-direction:column;
    gap:12px;
}

.member-nav span {
    display:block;
    margin-bottom:12px;

    text-align:center;
    font-weight:700;
    color:#263238;
}

.small-btn,
.member-nav a,
.member-nav button {
    display:flex;
    align-items:center;
    justify-content:center;

    width:100%;
    box-sizing:border-box;

    padding:10px 8px 12px;

    border:1px solid rgba(20,40,50,0.10);
    border-radius:999px;

    font-size:14px;
    line-height: 100%;
    font-weight:600;
    letter-spacing:0.03em;

    cursor:pointer;
    text-decoration:none;


    color:#ffffff;
    background:
        linear-gradient(
            180deg,
            #244b55 0%,
            #102a33 100%
        );
    box-shadow:
        0 6px 16px rgba(0,0,0,0.16);

    transition:
        opacity 0.3s ease;
}
.small-btn {
    display: inline-block;
    width: auto;
    min-width: 100px;
    padding:6px 8px 8px;
    text-align: center;
}
.small-btn:hover,
.member-nav a:hover, 
.member-nav button:hover { 
    opacity: 0.8;
}
.member-nav a.off {
    opacity: 0.6;
}




/* center
------------------------------------------------------ */

.member-content{
    flex:1;
    padding:20px;
    min-width: 0;
}
#root { 
    max-width: 960px;
    margin:  0 auto;
    padding: 40px;
}



/* サインイン
------------------------------------------------------ */

#p-signup{
    background:#f5f7f8;
}
.signup-page-wrapper{
    max-width:560px;
    margin:40px auto;
    padding:0 15px;
}
.signup-card{
    min-height: 300px;
    background:#fff;
    border-radius:14px;
    box-shadow:0 8px 24px rgba(0,0,0,.08);
    padding:30px;
}

#p-signup .input-wrapper {
    width: 400px;
    margin: 0 auto;
    text-align: left;
}

#p-signup .input-wrapper > div {
    display: grid;
    grid-template-columns: 130px 1fr; /* 左：固定幅 / 右：可変 */
    align-items: center; /* 縦位置を揃える */
    gap: 10px; /* ラベルと入力の間 */
}
#p-signup .input-wrapper > div:last-child {
    display: flex;
    justify-content: center;
}
#p-signup .input-wrapper input{
    width:100%;
    box-sizing:border-box;
}
#p-signup .input-wrapper span{
    display:block;
    margin-bottom:6px;
    font-weight:600;
}
#p-signup .input-wrapper em{
    color:#d33;
    font-style:normal;
}
#p-signup .input-wrapper span em {
    color: crimson;
}

#p-signup .wallet-btn{
    width:100%;
}
#p-signup .error-msg {
    width: 350px;
    margin: 40px auto 0;
    text-align: left;
}
#p-signup .error-msg li {
    color: crimson;
    font-size: 90%;
}







/* ログイン
------------------------------------------------------ */

#p-top .login-msg {
    color: green;
}
#p-top .input-wrapper {
    width: 400px;
    margin: 0 auto;
    text-align: left;
}
#p-top .input-wrapper > div {
    display: grid;
    grid-template-columns: 90px 1fr; /* 左：固定幅 / 右：可変 */
    align-items: center; /* 縦位置を揃える */
    gap: 10px; /* ラベルと入力の間 */
}
#p-top .input-wrapper > div:nth-child(3) {
    display: flex;
    justify-content: center;
}
#p-top .input-wrapper span {
    display: block;
    font-weight: bold;
}
p#login_message {
    color: crimson;
    margin-top: 20px;
    text-align: center;
}

.password-wrapper{
    position:relative;
}

.password-wrapper input{
    width:100%;
    padding-right:50px;
    box-sizing:border-box;
}

.password-toggle{
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:none;
    cursor:pointer;
    padding:0;
    color:#666;
}

.password-toggle:hover{
    color:#333;
}

.material-symbols-outlined{
    font-size:22px;
    vertical-align:middle;
}




/* ダッシュボード
------------------------------------------------------ */

.dashboard {
}
.dashboard .box {
    margin-bottom: 20px;
    padding: 1em;
    border: solid 1px #555;
    background: #eee;
}







/* 紹介コード
------------------------------------------------------ */

.invite-title {
    margin-bottom: 8px;
}

.invite-link input#qr-url {
    width: 100%;
}

.invite-copy-area {
    margin-top: 12px;
}

.invite-qr {
    text-align: center;
}

#qrcode {
    display: inline-block;
    margin: 15px auto 0;
}





/* SBT管理
------------------------------------------------------ */

.wallet-list {
    margin-bottom: 20px;
    padding: 1em 0 1em 5%;
    border: solid 1px #555;
    background: #eee;
}
.wallet-list ul {
}
.wallet-list ul li.wallet-list-item {
    position: relative;
    display: block;
    padding-left: 28px;
    margin-bottom: 8px;
    min-width: 0;
}
.wallet-list ul li.wallet-list-item::before {
    position: absolute;
    left: 0;
    top: 0;
    
    content: "link_off";
    font-family: 'Material Symbols Outlined';
    font-size: 20px;
    font-weight: normal;
    vertical-align: middle;
}
.wallet-list .wallet-address {
    display: inline;
    font-size: 1.2rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.wallet-list ul li.wallet-list-item.is-connected {
    color:#13A467;
    font-weight: bold;
}
.wallet-list ul li.wallet-list-item.is-connected::before {
    content: "link";
}
.wallet-list .wallet-connected-icon {
    display: inline;
    margin-left: 10px;
    color: #13A467;
    font-weight: normal;
    white-space: nowrap;
}
.wallet-list-empty {
}
.wallet-list-add {
    font-size: 90%;
    margin-bottom: 30px;
}
.connected-wallet-address {
  margin: 8px 0;
  padding: 10px;
  background: #fff;
  border: 1px solid #e0b4b4;
  border-radius: 6px;
  color: #333;
  font-size: 13px;
  word-break: break-all;
}

.wallet-notice {
  margin: 18px 0 14px;
  padding: 14px 16px;
  border: 1px solid #d8dce3;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 14px;
  line-height: 1.7;
}

.wallet-notice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
}

.wallet-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f2b84b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.wallet-notice p {
  margin: 8px 0 0;
}

.wallet-notice-address {
  padding: 8px 10px;
  border: 1px solid #e3e6eb;
  border-radius: 6px;
  background: #f8f9fb;
  font-size: 13px;
  word-break: break-all;
}




/* status
------------------------------------------------------ */

.show-status {/*一瞬出るメッセージ*/
  padding: 10px 0;
  font-size: 90%;
  line-height: 1.7;
  color: #333;
  color: #13A467;
}



/* Wallet系ボタン
------------------------------------------------------ */
.wallet-connect-panel {
}
.not-connected {
    margin-bottom: 30px;
}
.wallet-btn-wrapper {
    margin-bottom: 30px;
    text-align: center;
}
.wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 180px;
  margin:  0 10px 20px;
  padding: 13px 22px;

  border: none;
  border-radius: 999px;

  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;

  cursor: pointer;

  color: #ffffff;
  background: linear-gradient(135deg, #111827, #374151);

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease,
    opacity 0.16s ease;
}

.wallet-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.wallet-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.24),
    inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

.wallet-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
/* ブルー系 */
.wallet-btn-connectwallet,
.wallet-btn-loginsign {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}
/* 緑系 */
.wallet-btn-xxxxx {
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
}
/* オレンジ系 */
.wallet-btn-xxxxxxx {
  background: linear-gradient(135deg, #c2410c, #fb923c);
}
/* 赤系 */
.wallet-btn-verify {
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
}
/* ログアウト系 */
.wallet-btn-disconnect,
.wallet-btn-logout {
  min-width: 130px;
  padding: 9px 12px;
  box-shadow: none;
  font-size: 13px;
}




/* SBT保有状況
------------------------------------------------------ */

.current-rank {
    margin-bottom: 20px;
    padding: 1em;
    border: solid 1px #555;
    background: #eee;
    text-align: center;
    line-height: 170%;
}
.current-rank p {
}
.current-rank p img {
    display: block;
    width: 200px;
    margin: 10px auto;
}
.current-rank strong {
    font-size: 1.2rem;
    display: inline-block;
}
.current-rank strong.rank-BRM { color: #875737;}
.current-rank strong.rank-SIM { color: #555;}
.current-rank strong.rank-GOM { color: #956502;}
.current-rank strong.rank-SPM { color: #223D8B;}



/* SBT取得（一覧）
------------------------------------------------------ */

.sbt-list-wrapper {
}

.card-list,
.cards,
.sbt-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* カード共通 */
.card {
  border-radius: 18px;
  padding: 24px;
  min-height: 260px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255,255,255,0.28);

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  transition: transform 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
}
.card:has(button:disabled):hover {
  transform: none;
}
.card:not(:has(button:disabled)):hover {
  transform: translateY(-4px);
}
.card:has(button:disabled) {
  opacity: 0.5;
  background: #aaa;
}
.card:has(button:disabled) button {
  pointer-events: none;
}




/* ---------------------------------
   1枚目 bronze
--------------------------------- */
.card:nth-child(1) {
  background: linear-gradient(
    135deg,
    #7a4520,
    #c78347,
    #efbb7b
  );

  color: #fff8ef;
}

/* ---------------------------------
   2枚目 silver
--------------------------------- */
.card:nth-child(2) {
  background: linear-gradient(
    135deg,
    #68707d,
    #c8d0db,
    #f5f7fa
  );

  color: #1f2937;
}

/* ---------------------------------
   3枚目 gold
--------------------------------- */
.card:nth-child(3) {
  background: linear-gradient(
    135deg,
    #8a5a00,
    #facc15,
    #fff0a6
  );

  color: #3b2b00;
}

/* ---------------------------------
   4枚目 sapphire
--------------------------------- */
.card:nth-child(4) {
  background: linear-gradient(
    135deg,
    #0A1A56,
    #2563eb,
    #7dd3fc
  );

  color: #eef6ff;
}

.card h2,
.card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 140%;
}
.card h4 { 
    text-align: center;
    line-height: 140%;
    color: #fff;
}
.card p img {
    display: block;
    margin:  10px auto;
}
.card .price {
  font-size: 28px;
  font-weight: bold;
  margin: 14px 0;
}

.card small,
.card .contract {
  display: block;

  margin-top: 14px;

  font-size: 10px;
  line-height: 1.45;

  opacity: 0.72;

  word-break: break-all;
  overflow-wrap: anywhere;
}

/* ボタン */
.card button {
  margin-top: 22px;

  width: 100%;
  padding: 14px 18px;

  border: none;
  border-radius: 999px;

  font-size: 15px;
  font-weight: 700;

  cursor: pointer;

  background: rgba(255,255,255,0.9);
  color: #111827;

  box-shadow: 0 8px 18px rgba(0,0,0,0.22);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

.card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(0,0,0,0.28);
  background:#13A467;
  color: #fff;
  transition:0.3s ease;
}

.card button:active {
  transform: translateY(0);
}

.card button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}




/* MINT時 loader
------------------------------------------------------ */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  backdrop-filter: blur(6px);
}

.loading-box {
  width: 50%;
  text-align: center;
  padding: 36px 42px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.loading-box img {
  display: block;
  width: 84px;
  height: 84px;
  margin:  0 auto;
  object-fit: contain;
}

.loading-box p {
  margin-top: 18px;
  color: #13A467;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}





/* 組織図
------------------------------------------------------ */

.b_list {
    padding: 15px;
    background: #fff;
    border: solid 1px #ccc;
}
ul.show_bl,
ul.show_bl ul {
  position: relative;
  margin: 0 0 0 7px;
  padding: 0;
  list-style-type: none;
}

/* 子階層の開閉アニメーション */
ul.show_bl ul {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
}

/* 開いている状態 */
ul.show_bl ul.open {
  max-height: 2000px;
  opacity: 1;
  margin-bottom: 10px;
}

ul.show_bl li {
  position: relative;
  margin: 0;
  padding: 7px 15px 0;
  white-space: nowrap;
}

.show_marker {
  margin-right: 5px;
}

.li_data {
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 縦線 */
ul.show_bl:before,
ul.show_bl ul:before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-left: 1px dotted #909090;
}

/* 横線 */
ul.show_bl li:before {
  content: "";
  display: block;
  position: absolute;
  top: 15px;
  left: 0;
  width: 15px;
  height: 0;
  border-top: 1px dotted #909090;
}

/* 最後の子の縦線を止める */
ul.show_bl li:last-child:before {
  top: 15px;
  bottom: 0;
  height: auto;
  background-color: #fff;
}









/* バイナリ―マップ
------------------------------------------------------ */

.binary-map-section {
    padding: 20px;
}

/* ---------------------------------------------------------
   上部情報
--------------------------------------------------------- */
.binary-map-info {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

/* ---------------------------------------------------------
   ボタン群
--------------------------------------------------------- */
.binary-map-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.binary-map-mode-btn {
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
}
.binary-map-mode-btn:hover {
    background: #f3f3f3;
}
.binary-map-mode-btn.is-current {
    background: #303030;
    color: #fff;
    border-color: #303030;
}

/* ---------------------------------------------------------
   Zoom
--------------------------------------------------------- */
.binary-map-zoom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.binary-map-zoom button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #303030;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}
#binary_zoom_range {
    width: 240px;
}

/* ---------------------------------------------------------
   スクロールエリア
--------------------------------------------------------- */
.binary-map-window {
    overflow: auto;
    padding: 40px;
    background: #f7f7f7;
    border-radius: 12px;
    min-height: 600px;
    max-height: 80vh;
    
    overflow-x: auto;
    overflow-y: auto;
    
    cursor: grab;
}
.binary-map-window.is-dragging {
    cursor: grabbing;
    user-select: none;
}
.binary-scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    height: 18px;
    margin-bottom: 6px;
}
#binary_scroll_top_inner {
    height: 1px;
}

/* ---------------------------------------------------------
   ツリー本体
--------------------------------------------------------- */
.binary-map-tree {
    display: inline-block;
    transform-origin: top left;
}

/* ---------------------------------------------------------
   各ノード
--------------------------------------------------------- */
.binary-node {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.binary-node-box {
    width: 150px;
    min-width: 150px;
    box-sizing: border-box;
    padding: 12px;
    background: #fff;
    border: 2px solid #303030;
    border-radius: 12px;
    text-align: center;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}
.binary-node-box.is-clickable {
    cursor: pointer;
    transition: .2s;
}
.binary-node-box.is-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.binary-node-box.is-my-node {
    border: 3px solid #00a86b;
    box-shadow: 0 0 0 4px rgba(0,168,107,.18);
}

.binary-map-back-btn {
    border: 1px solid #303030;
    background: #fff;
    color: #303030;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}
.binary-map-back-btn:hover {
    background: #303030;
    color: #fff;
}

/* ---------------------------------------------------------
   会員名
--------------------------------------------------------- */
.binary-node-name {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 8px;
}

/* ---------------------------------------------------------
   会員ID
--------------------------------------------------------- */
.binary-node-id {
    font-size: 11px;
    margin-bottom: 8px;
    color: #666;
}

/* ---------------------------------------------------------
   左右情報
--------------------------------------------------------- */
.binary-node-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    font-size: 11px;
}
.binary-node-stats .left {
    text-align: left;
}
.binary-node-stats .right {
    text-align: right;
}

/* ---------------------------------------------------------
   子ノード
--------------------------------------------------------- */
.binary-children {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 18px;
    margin-top: 46px;
    position: relative;
}
.binary-parent-line {
    position: absolute;
    left: 50%;
    top: calc(100% + 2px);
    width: 3px;
    height: 23px;
    background: #999;
    transform: translateX(-50%);
    z-index: 1;
}
.binary-line {
    position: absolute;
    top: -23px;
    height: 3px;
    background: #999;
    z-index: 1;
}

.binary-children > .binary-node::before,
.binary-children > .binary-node-empty-wrap::before {
    content: "";
    position: absolute;
    top: -23px;
    left: 50%;
    width: 3px;
    height: 23px;
    background: #999;
    transform: translateX(-50%);
}

/* ---------------------------------------------------------
   空き枠
--------------------------------------------------------- */
.binary-empty {
    width: 150px;
    min-width: 150px;
    box-sizing: border-box;
    padding: 16px 10px;
    border: 2px dashed #bbb;
    border-radius: 12px;
    background: #fafafa;
    text-align: center;
}
.binary-empty button {
    border: none;
    background: #303030;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* ---------------------------------------------------------
   レベル色
--------------------------------------------------------- */
.binary-rank-bronze {
    background: #d0a070;
}
.binary-rank-silver {
    background: #c0c0c0;
}
.binary-rank-gold {
    background: #d4b200;
    color: #000;
}
.binary-rank-sapphire {
    background: #4da3ff;
    color: #fff;
}






/* ---------------------------------------------------------
   （バイナリ）スマホ
--------------------------------------------------------- */

@media (max-width: 767px) {

    .binary-map-section {
        padding: 10px;
    }

    .binary-map-info {
        font-size: 15px;
    }

    .binary-map-actions {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }

    .binary-map-mode-btn,
    .binary-map-back-btn {
        padding: 7px 12px;
        font-size: 13px;
    }

    .binary-map-zoom {
        gap: 8px;
        margin-bottom: 14px;
    }

    .binary-map-zoom button {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    #binary_zoom_range {
        width: 160px;
    }

    .binary-scroll-top {
        height: 16px;
    }

    .binary-map-window {
        padding: 20px 10px;
        min-height: 520px;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .binary-map-tree {
        transform-origin: top left;
    }

    .binary-node-box {
        width: 120px;
        min-width: 120px;
        padding: 9px;
        font-size: 11px;
        border-radius: 10px;
    }

    .binary-node-name {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .binary-node-id {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .binary-node-stats {
        gap: 5px;
        margin-top: 7px;
        font-size: 9px;
    }

    .binary-children {
        gap: 14px;
        margin-top: 38px;
    }

    .binary-children::before {
        top: -19px;
        width: 2px;
        height: 19px;
    }
    .binary-line {
        top: -19px;
        height: 2px;
    }
    .binary-children > .binary-node::before,
    .binary-children > .binary-node-empty-wrap::before {
        top: -19px;
        width: 2px;
        height: 19px;
    }

    .binary-empty {
        width: 120px;
        min-width: 120px;
        padding: 12px 8px;
        border-radius: 10px;
        font-size: 11px;
    }

    .binary-empty button {
        padding: 6px 8px;
        font-size: 10px;
        border-radius: 6px;
    }

}





/* 投資履歴
------------------------------------------------------ */

.investment-wallet-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.8;
  word-break: break-all;
}
body#p-investment-history .wallet-list ul li.wallet-list-item::before {
    content: "wallet";
}
.investment-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.investment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 900px;
}
.investment-table th,
.investment-table td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.investment-table th {
  background: #fff;
  font-weight: 700;
}
.investment-sub {
  margin-top: 4px;
  font-size: 11px;
  color: #777;
}
.investment-table a {
  color: #1a73e8;
  text-decoration: none;
}
.investment-table a:hover {
  text-decoration: underline;
}

.muted {
  color: #777;
}
.wallet-list:has(p.muted) {
  padding: 1em;
}
.investment-sync-warning {
  color: #8a5a00;
  background: #fff8e1;
  border: 1px solid #f3d27a;
  font-size: 13px;
}






/* 会員情報編集
------------------------------------------------------ */

.member-edit-form{
    max-width:720px;
}
.member-edit-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
}
.member-edit-table th,
.member-edit-table td{
    padding:14px;
    border:1px solid #ddd;
    vertical-align:middle;
}
.member-edit-table th{
    width:180px;
    background:#f5f5f5;
    text-align:left;
    font-weight:bold;
}
.member-edit-table input{
    width:100%;
    box-sizing:border-box;
    padding:10px;
    border:1px solid #ccc;
    border-radius:4px;
    font-size:15px;
}
.input-note{
    margin:6px 0 0;
    font-size:13px;
    color:#777;
}
.form-btn-area{
    margin-top:25px;
    text-align:center;
}
.submit-btn{
    min-width:180px;
    padding:12px 25px;
    border:0;
    border-radius:5px;
    background:#1f8f5f;
    color:#fff;
    font-size:16px;
    cursor:pointer;
}
.submit-btn:hover{
    opacity:.85;
}
.form-message{
    max-width:720px;
    margin-bottom:15px;
    padding:12px 15px;
    border-radius:5px;
}
.form-error{
    background:#ffecec;
    color:#b00020;
    border:1px solid #f5b5b5;
}
.form-success{
    background:#e9f8ef;
    color:#137a3a;
    border:1px solid #9ed9b3;
}
@media screen and (max-width: 768px){
    .member-edit-table,
    .member-edit-table tbody,
    .member-edit-table tr,
    .member-edit-table th,
    .member-edit-table td{
        display:block;
        width:100%;
        box-sizing:border-box;
    }
    .member-edit-table th{
        border-bottom:0;
    }
}








/* 
########################################

       - 後半スマホ o.w.  

########################################
*/



/* レスポンシブ（共通）
------------------------------------------------------ */

@media screen and (max-width: 900px) {

  .member-header {
    padding: 10px 15px;
  }

  #main {
    display: block;
    min-height: auto;
    background-size: auto;
  }

  .member-left {
    width: auto;
    margin: 0 15px 15px;
    padding: 18px 14px;
  }

  .member-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .member-nav span {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .member-content {
    padding: 15px;
  }

  #root {
    max-width: none;
    padding: 20px 0;
  }

  .top-right-actions {
    text-align: center;
    margin-bottom: 20px;
  }

  .top-right-actions button {
    margin-left: 0;
  }

  .wallet-list {
    padding: 1em;
  }

  .wallet-list ul li.wallet-list-item {
    position: relative;
    display: block;
    padding-left: 28px;
    margin-bottom: 8px;
    min-width: 0;
  }

  .wallet-list ul li.wallet-list-item::before {
    position: absolute;
    left: 0;
    top: 0;
  }

  .wallet-list .wallet-address {
    display: inline;
    font-size: 1rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .wallet-list .wallet-connected-icon {
    display: inline;
    margin-left: 6px;
    white-space: nowrap;
  }




  
  
  
  
  
  .card-list,
  .cards,
  .sbt-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media screen and (max-width: 600px) {

  .member-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .member-nav span {
    grid-column: 1 / -1;
  }

  .member-nav a,
  .member-nav button {
    min-height: 44px;
    padding: 10px 8px 12px;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
  }

}



/* レスポンシブ（ハンバーガーメニュー）
------------------------------------------------------ */

.sp-menu-btn {
  display: none;
}

@media screen and (max-width: 600px) {

  .member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
  }

  .header-right a img {
    height: 24px;
  }
  .sp-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;

    width: 46px;
    height: 46px;
    margin: 0 0 0 10px;
    flex-shrink: 0;

    border: none;
    border-radius: 10px;
    background: #102a33;
    cursor: pointer;
  }

  .sp-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
    transition: 0.25s ease;
  }

  .sp-menu-btn.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .sp-menu-btn.is-open span:nth-child(2) {
    opacity: 0;
  }

  .sp-menu-btn.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

    .member-left {

      display: block;

      overflow: hidden;

      max-height: 0;
      opacity: 0;

      margin: 0 12px;

      padding-top: 0;
      padding-bottom: 0;

      transition:
        max-height 0.22s ease-out,
        opacity 0.16s ease-out,
        padding 0.18s ease-out,
        margin 0.18s ease-out;
    }

    .member-left.is-open {

      max-height: 700px;
      opacity: 1;

      margin: 0 12px 15px;

      padding: 16px 12px;
    }



  .member-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .member-nav span {
    grid-column: 1 / -1;
  }

  .member-nav a,
  .member-nav button {
    min-height: 44px;
    padding: 10px 8px 12px;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
  }
}





/* レスポンシブ（ログインフォーム）
------------------------------------------------------ */

@media screen and (max-width: 600px) {



  #p-top #root {
    width: 100%;
    padding: 20px 15px;
  }

  #p-top h1 {
    margin-bottom: 30px !important;
  }

  #p-top h1 img {
    max-width: 220px;
    height: auto;
  }

  #p-top .wallet-btn-wrapper {
    width: 100%;
  }

  #p-top .input-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  #p-top .input-wrapper > div {
    display: block;
  }

  #p-top .input-wrapper span {
    display: block;
    margin-bottom: 5px;
  }

  #p-top .wallet-btn {
    width: 100%;
  }

  #login_message {
    margin-top: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  
  
  #p-signup #root {
    width: 100%;
    padding: 20px 15px;
  }

  #p-signup h1 {
    font-size: 1.4rem;
    line-height: 1.4;
  }

  #p-signup .input-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  #p-signup .input-wrapper > div {
    display: block;
  }

  #p-signup .input-wrapper span {
    margin-bottom: 5px;
  }

  #p-signup .wallet-btn {
    width: 100%;
  }

}





