:root {
  --bg:#fff;
  --line-2:#2b2b2b;
  --text:#101010;
  --muted:#585858;
  --footer-h:40px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font-family:var(--font)}
a{color:inherit;text-decoration:none}

/* 縦フル高：ヘッダー固定高さにせず、メインが残りを埋める */
.site-shell{
  min-height:calc(100vh - 14px);
  min-height:calc(100dvh - 14px);
  display:flex;
  flex-direction:column;
  background:#fff;
  overflow-x:hidden;
  border-radius:0;
  width: 100%;
  max-width: calc(100% - 14px);
  margin: 7px auto;
  border:0;
}

.site-header{
  flex:0 0 auto;
  padding:0;
  border-bottom:0;
  background:#fff;
  border-radius:0;
}

.site-header__inner{
  max-width:1680px;
  margin:0 auto;
  padding:12px 62px;
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:space-between;
  gap:16px 24px;
  min-width:0;
}
.site-header__inner .brand{flex:0 0 auto}
.site-header__left{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.site-header__inner .site-nav{
  flex:1 1 auto;
  display:flex;
  justify-content:center;
  flex-wrap:nowrap;
  gap:24px 42px;
  font-size:14px;
  font-weight:700;
  letter-spacing:.06em;
  min-width:0;
}
.site-header__inner .site-actions{flex:0 0 auto}

.brand{font-weight:800;letter-spacing:.02em;font-size:30px;white-space:nowrap}
.brand.halftone-brand{display:inline-flex;align-items:center;line-height:0}
.brand .halftone-brand__logo{height:32px;width:auto;max-width:min(200px,40vw);display:block;object-fit:contain}
.site-nav a{opacity:.85}
.site-nav a:hover{opacity:1}
.site-actions{display:flex;align-items:center;gap:14px}
.ft-menu-toggle{display:none !important;border:0;background:transparent;padding:4px;cursor:pointer}
.navicon{
  position:relative;
  display:block;
  width:18px;
  height:2px;
  background:#111;
  border-radius:1px;
}
.navicon:before,
.navicon:after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  background:#111;
  border-radius:1px;
}
.navicon:before{top:-6px}
.navicon:after{top:6px}
.ft-mobile-menu{display:none !important}
.ft-mobile-overlay{display:none !important}
.sub-link{font-size:12px;font-weight:600;opacity:.72;white-space:nowrap}
.sub-link:hover{opacity:1}
.login-icon-btn{
  position:relative;
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid var(--line-2);
  background:#fff;
  color:#101010;
  text-decoration:none;
}
.login-icon-btn svg{width:16px;height:16px;fill:currentColor}
.login-icon-btn:hover{background:#111;color:#f4f4f2}
.site-shell.is-authenticated .login-icon-btn{
  background:#0a8a60;
  border-color:#0a8a60;
  color:#fff;
  box-shadow:0 0 0 3px rgba(10,138,96,.2);
}
.site-shell.is-authenticated .login-icon-btn::after{
  content:"";
  position:absolute;
  top:-1px;
  right:-1px;
  width:9px;
  height:9px;
  border-radius:999px;
  background:#34d399;
  border:2px solid #fff;
  box-shadow:0 0 0 1px rgba(10,138,96,.45);
}
.site-shell.is-authenticated .login-icon-btn:hover{
  background:#087a54;
  color:#fff;
}

/* 契約済み: ft-halftone-user-nav が .login-icon-btn--account を付与。親 .is-authenticated だけに依存しない */
.login-icon-btn.login-icon-btn--account{
  background:#0a8a60;
  border-color:#0a8a60;
  color:#fff;
  box-shadow:0 0 0 3px rgba(10,138,96,.2);
}
.login-icon-btn.login-icon-btn--account::after{
  content:"";
  position:absolute;
  top:-1px;
  right:-1px;
  width:9px;
  height:9px;
  border-radius:999px;
  background:#34d399;
  border:2px solid #fff;
  box-shadow:0 0 0 1px rgba(10,138,96,.45);
}
.login-icon-btn.login-icon-btn--account:hover{
  background:#087a54;
  color:#fff;
}
/* 言語 UI はサイト共通 assets/css/ft-i18n-lang.css（.ft-lang-switch）に統一 */
.sign-btn{display:inline-flex;align-items:center;height:40px;padding:0 18px;border-radius:12px;border:1px solid var(--line-2);background:#fff;color:#101010;font-weight:700;cursor:pointer;text-decoration:none}
.sign-btn--launch{background:#111;color:#f4f4f2}

/* 枠・角丸をやめてダークエリアを横いっぱいに */
.app-stage{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:0;
  background:#120d07;
}
#appFrame{
  flex:1 1 auto;
  width:100%;
  min-height:0;
  border:0;
  border-radius:0;
  display:block;
  background:#120d07;
}

.site-footer{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  max-width:1680px;
  margin:0 auto;
  padding:12px 62px;
  width:100%;
  box-sizing:border-box;
  color:var(--muted);
  font-size:11px;
  border-top:0;
  background:#fff;
  border-radius:0;
}

/* B: 段階ブレイクポイント
   <=1100px: ヘッダーを圧縮（文字間隔など）
   <=600px: ハンバーガーメニューへ切替 */

@media (max-width:600px){
  .site-shell{
    max-width:100%;
    margin:0;
    border-radius:0;
    border:0;
  }
  .site-header__inner{
    flex-wrap:nowrap;
    padding:14px 20px;
  }
  .site-header__inner .brand:not(.halftone-brand){font-size:24px}
  .site-header__inner .halftone-brand__logo{height:28px}
  .site-header__inner .site-nav{display:none}
  .sub-link{font-size:11px}
  .site-header__inner .site-actions{
    display:inline-flex;
    margin-left:0;
    gap:8px;
  }
  .site-header__inner .site-actions .sub-link,
  .site-header__inner .site-actions .login-icon-btn{
    display:none;
  }
  .site-header__inner .site-actions .ft-lang-switch__select{
    min-width:84px;
    font-size:12px;
    padding:3px 22px 3px 8px;
  }
  .ft-menu-toggle{
    display:inline-flex !important;
    margin-left:auto;
    align-items:center;
    justify-content:center;
    z-index:1002;
  }
  .ft-mobile-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease-out;
    z-index:1000;
  }
  .ft-mobile-menu{
    position:fixed;
    top:0;
    left:0;
    right:0;
    background:#151515;
    color:#fff;
    border-radius:0 0 24px 24px;
    padding:72px 24px 28px;
    display:grid !important;
    gap:10px;
    transform:translateY(-10px);
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease-out,transform .18s ease-out;
    z-index:1001;
    max-height:100vh;
    overflow:auto;
  }
  .ft-mobile-menu a{
    font-size:15px;
    font-weight:600;
    letter-spacing:.03em;
    padding:8px 0;
  }
  body.ft-mobile-open{
    overflow:hidden;
  }
  body.ft-mobile-open .ft-mobile-overlay{
    opacity:1;
    pointer-events:auto;
  }
  body.ft-mobile-open .ft-mobile-menu{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
  }
  .site-footer{padding:12px 20px}

  /* Main content: keep mobile switch aligned with <=600px. */
  .app-stage{
    padding:0;
  }
  #appFrame{
    border-radius:0;
  }
}

@media (max-width:1100px){
  .site-header__inner{
    padding:12px 20px;
    gap:10px 16px;
  }
  .site-header__inner .site-nav{
    gap:14px 18px;
    font-size:13px;
  }
  .site-actions{
    gap:8px;
  }
  .sub-link{
    font-size:11px;
  }
}
