.reading-subbar{
  position: sticky;
  top: 56px;
  z-index: 90;

  display:flex;
  align-items:center;
  justify-content:space-between;

  width:100%;
  height:61px;
  min-height:61px;
  padding:0 16px;
  box-sizing:border-box;
  overflow:hidden;

  background:#fff;
  border-bottom:1px solid rgba(0,0,0,.06);

  transition:
    top .22s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.reading-subbar.is-header-hidden{
  top:0;
}

.reading-subbar.is-stuck{
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  border-bottom-color:rgba(0,0,0,.08);
}

.reading-subbar__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-left:auto;
  flex:0 1 auto;
  height:100%;
  min-width:0;
  flex-wrap:nowrap;
}

.reading-back-btn{
  width:38px;
  height:38px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  background:#fff;
  border:none;
  border-radius:12px;
  text-decoration:none;
  cursor:pointer;
  transition:background .15s ease;
  flex:0 0 auto;
}

.reading-back-btn img{
  width:16px;
  height:16px;
  display:block;
}

.reading-back-btn:hover{
  background:rgba(0,0,0,0.06);
}

.reading-back-btn:active{
  background:rgba(0,0,0,0.12);
}

.cfg-app-btn--subbar{
  width:38px;
  height:38px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  background:#fff;
  border:none;
  border-radius:14px;
  cursor:pointer;
  transition:background .15s ease;

  flex:0 0 auto;
}

.cfg-app-btn--subbar:hover{
  background:rgba(0,0,0,0.06);
}

.cfg-app-btn--subbar:active{
  background:rgba(0,0,0,0.12);
}

.cfg-app-btn--subbar img{
  width:24px;
  height:24px;
  display:block;
}

.lang-switch{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  width:auto;
  max-width:100%;
  flex:0 1 auto;

  background:#ececec;
  border:1px solid rgba(0,0,0,.08);
  border-radius:999px;
  padding:3px;
  gap:0;
  box-sizing:border-box;
}

.lang-switch__btn{
  border:0;
  background:transparent;
  color:#555;
  font-size:12px;
  font-weight:700;
  line-height:1;
  min-width:44px;
  height:32px;
  padding:0 14px;
  border-radius:999px;
  cursor:pointer;
  transition:background .18s ease, color .18s ease, box-shadow .18s ease;

  flex:0 0 auto;
  text-align:center;
  white-space:nowrap;
}

.lang-switch__btn.is-active{
  background:#111;
  color:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.16);
}

.role-switch{
  max-width:220px;
}

.role-switch .lang-switch__btn{
  min-width:58px;
  padding:0 14px;
}

.role-switch .lang-switch__btn.is-active,
.role-switch .dialogue-role-btn.is-active{
  background:#111;
  color:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.16);
}

@media (max-width: 640px){
  .reading-subbar{
    height:61px;
    min-height:61px;
    padding:0 16px;
  }

  .reading-subbar__actions{
    gap:8px;
  }

  .lang-switch{
    width:auto;
    max-width:100%;
    justify-content:center;
    gap:0;
  }

  .lang-switch__btn{
    flex:0 0 auto;
    min-width:42px;
    height:32px;
    padding:0 12px;
    text-align:center;
  }

  .role-switch{
    max-width:200px;
  }

  .role-switch .lang-switch__btn{
    min-width:52px;
    padding:0 12px;
  }
}
/* ▼ メニュー */
.reading-menu{
  position: fixed;
  top: 72px;
  left: 10px;

  min-width: 180px;
  padding: 8px;
  border-radius: 14px;

  background: rgba(255,255,255,.96);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 12px 30px rgba(0,0,0,.16);

  z-index: 220;

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.reading-menu.is-open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.reading-menu a{
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.reading-menu a:hover{
  background: rgba(0,0,0,.06);
}
.reading-menu a.is-active{
  background: #111;
  color: #fff;
}
.reading-menu__back{
  margin-top: 4px;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 12px !important;
}
/* ▼ 本文グレー */
.reading-menu-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.18);
  z-index: 210;
}
@media (max-width: 640px){
  .reading-menu{
    top: 68px;
    left: 8px;
    right: 8px;
    min-width: 0;
  }
}
.cfg-app-btn--subbar.player-study-btn.is-saved{
  background: #111;
}

.cfg-app-btn--subbar.player-study-btn.is-saved img{
  filter: brightness(0) invert(1);
}
.role-switch{
  max-width: 220px;
}

.role-switch .lang-switch__btn{
  min-width: 58px;
  padding: 0 14px;
}

.role-switch .lang-switch__btn.is-active,
.role-switch .dialogue-role-btn.is-active{
  background:#111;
  color:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.16);
}