/* 스크롤 바 제거 */
.book-col {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge (legacy) */
}
.book-col::-webkit-scrollbar {
  display: none;                /* Chrome / Safari */
}

/* Layout */
.page{min-height:calc(100vh - 64px); padding:22px 18px 120px; display:flex; justify-content:center; background-color:var(--bg);}
.wrap{width:min(980px,100%)}

/* Bible content card */
.card{
  background:var(--card);
  border:1px solid rgba(234,236,240,.9);
  border-radius:22px;
  box-shadow:0 10px 30px rgba(16,24,40,.06);
  overflow:hidden;
}
.card-head{
  padding:18px 18px 14px;
  border-bottom:1px solid rgba(234,236,240,.9);
  display:flex; gap:12px; align-items:baseline; justify-content:space-between;
  background:linear-gradient(180deg, rgba(255,106,0,.06), rgba(255,255,255,0));
}
.title{
  font-size: var(--font-large);
  color: var(--text);
  font-weight:950;
  letter-spacing:-.4px
}
.meta{font-size:var(--font-small); color:var(--muted); font-weight:700}
.status{
  padding:10px 18px;
  font-size:13px; color:var(--muted); font-weight:700;
  border-bottom:1px solid rgba(234,236,240,.9);
  display:none;
}
.status[data-show="true"]{display:block}
.content{padding:16px 18px 18px}

/* Verse rendering */
.verses{display:flex; flex-direction:column; gap:10px}
.verse{
  display:grid;
  grid-template-columns: 30px 1fr;
  gap:10px;
}
.vnum{
  font-weight:950;
  font-size: var(--font-medium);
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}
.vlines{display:flex; flex-direction:column; gap:6px}
.vline{
  display:grid;
  grid-template-columns: 48px 1fr;
  gap:10px;
  align-items:center;
  line-height:1.6;
}
.trtag{
  font-size:11px;
  font-weight:600;
  color:rgba(16,24,40,.75);
  background:rgba(16,24,40,.06);
  border:1px solid rgba(16,24,40,.06);
  padding:3px 8px;
  border-radius:999px;
  width:max-content;
  align-self: start;
}
.trtag[data-tr="KRV"]{ background:rgba(255,106,0,.10); border-color:rgba(255,106,0,.18); color:rgba(255,106,0,.95); }
.trtag[data-tr="KJV"]{ background:rgba(0,0,0,.06); border-color:rgba(0,0,0,.08); color:rgba(0,0,0,.72); }

.vtext{
  color:var(--text);
  font-size: var(--font-medium);
  word-break:keep-all;
}
.vtext.empty{
  color:var(--text);
  font-weight:600;
  font-style:italic;
}

/* Fixed trigger (center-bottom) */
.trigger-row{
  position: fixed; transform: translateX(-50%); left: 50%;
  bottom:26px;

  display:flex; align-items: center;
  gap: 10px;
  z-index:30;
}

.trigger-row > .navbtn{
  width: 40px;
  height: 40px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:var(--reverse-bg);
  color:var(--reverse-text);
  box-shadow:var(--shadow);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.trigger-row > .navbtn:active{ transform: translateY(1px); }
.trigger-row > .navbtn:hover {
  box-shadow: 0 16px 30px var(--shadow-focus);
}

.trigger{
  display:flex; align-items:center;
  gap:7px;
  padding:12px 14px;
  border-radius:999px;
  background:var(--reverse-bg);
  color:var(--reverse-text);
  box-shadow:var(--shadow);
  cursor:pointer; user-select:none;
  border: 1px solid var(--border);
}
.trigger:hover {
  box-shadow: 0 16px 30px var(--shadow-focus);
}
.pill{
  background:var(--reverse-sub-bg);
  padding:6px 10px;
  border-radius:999px;
  font-weight:600;
  font-size:var(--font-small);
  letter-spacing:-.2px;
  flex-shrink: 0; white-space: nowrap;
}
.label{font-size:var(--font-small);font-weight:600;width:23px;}

/* Overlay + Sheet */
.overlay{
  position:fixed; inset:0;
  background:rgba(16,24,40,.38);
  opacity:0; pointer-events:none;
  transition:opacity .18s ease;
  z-index:31;
}
.overlay[data-open="true"]{opacity:1; pointer-events:auto}

.sheet{
  position:fixed;
  left:50%; transform:translateX(-50%);
  bottom:26px;
  width:min(820px, calc(100% - 36px));
  height:500px; /* fixed */
  border-radius:20px;
  background:var(--sheet-bg);
  backdrop-filter:blur(16px);
  border:1px solid var(--sheet-border);
  box-shadow:var(--shadow);
  z-index:32;
  overflow:hidden;

  translate:0 16px;
  opacity:0; pointer-events:none;
  transition:opacity .18s ease, translate .18s ease;
}
.sheet[data-open="true"]{opacity:1; translate:0 0; pointer-events:auto}

.sheet-top{
  height:45px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 14px;
  border-bottom:1px solid var(--sheet-border);
  font-size:var(--font-large);
}
.sheet-title{font-weight:950; letter-spacing:-.3px}
.close{
  width:34px; height:34px;
  border-radius:12px;
  border:1px solid var(--button-border);
  background:var(--button-bg);
  cursor:pointer;
  color:var(--text);
  font-weight:950;
}
.close:hover{
  background-color: var(--button-border);
}
.sheet-body{
  position: relative;
  height:calc(500px - 54px);
  display:grid;
  grid-template-columns: 200px 1fr 140px;
}
.col{
  min-width:0;
  border-right:1px solid var(--sheet-border);
  overflow:auto; /* independent scroll */
  position:relative;
}
.col:last-child{border-right:0}
.col-head{
  position:sticky; top:0; z-index:5;
  padding:10px 10px;
  background:var(--sheet-header-bg);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--sheet-header-border);
  font-weight:700;
  height: 42px;
  font-size:var(--font-medium)
}
.list{margin:0; padding:10px; list-style:none; display:flex; flex-direction:column; gap:6px;}
.book-col .list {
  padding:10px 44px 10px 10px;
}
.item{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid transparent;
  cursor:pointer; user-select:none;
}
.item:hover{background:rgba(16,24,40,.04)}
.item[data-active="true"]{
  border-color:var(--border-focus);
  background:var(--accent-soft);
}
.primary{font-weight:950; letter-spacing:-.2px;font-size:var(--font-medium);color:var(--text);}
.secondary{color:var(--muted); font-weight:700; font-size:var(--font-small); white-space:nowrap}

/* Translation checkbox list */
.tr-item{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid transparent;
  cursor:pointer;
  font-size:var(--font-medium);
}
.tr-item:hover{background: rgba(16, 24, 40, 0.07)
}
.tr-item[data-active="true"]{border-color:rgba(255,106,0,.30); background:var(--accent-soft)}
.chk{
  display:flex; align-items:center; gap:10px;
  font-weight:950;
}
input[type="checkbox"]{width:18px; height:18px}

/* Books quick index (3-book blocks jump) */

/* ✅ qbar: 스크롤과 무관하게 col 내부 오른쪽에 "고정" */
.qbar{
  position: absolute;
  /* book-col의 오른쪽 내부쯤에 오도록 조정 */
  right: 140px;          /* ✅ 3번째 컬럼(장) 폭만큼 왼쪽으로 */
  margin-right: 8px;

  top: 54px;             /* col-head 아래부터 */
  bottom: 10px;

  width: 26px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:center;

  user-select:none;
  touch-action:none;
  z-index: 50;

  border-radius: 999px;
  border: 1px solid var(--sheet-border);
  padding: 10px 0;
}

.qbtn{
  width: 20px;
  height: 18px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  font-size: 11px;
  font-weight: 950;
  color: var(--muted);
  pointer-events:none; /* 타겟은 qbar 전체 */
}

.qtoast{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;

  padding: 10px;
  border-radius: 6px;
  background: var(--reverse-bg);
  color: var(--reverse-text);
  font-weight: 950;
  font-size: 28px;
  letter-spacing: -0.6px;

  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.qtoast[data-show="true"]{ opacity: 1; }

.nav-toast{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;

  padding: 10px;
  border-radius: 6px;
  background: var(--reverse-bg);
  color: var(--reverse-text);
  font-weight: 950;
  font-size: 28px;
  letter-spacing: -0.6px;

  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.nav-toast[data-show="true"]{ opacity: 1; }

/* 번역본 태그 다중 번역일 때만 보이게 */
.vline{
  display: grid;
  grid-template-columns: 1fr; /* ✅ */
  gap: 10px;
  align-items: center;
  line-height: 1.6;
}
/*.multi-tr .vline{*/
/*  grid-template-columns: 48px 1fr; !* ✅ *!*/
/*}*/
.trtag{ display:none; }
/*.multi-tr .trtag{ display:inline-block; }*/

@media (max-width: 700px) {
  .sheet-body{ grid-template-columns: 170px 1fr 80px; }
  .qbar{ right: 80px; }
  .col {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .col::-webkit-scrollbar {
    display: none;
  }
  .item {
    padding: 6px 10px;
  }
  .translation-col .secondary {
    display: none;
  }
}

@media (max-width:520px){
  .sheet{
    left:0; transform:none;
    width:100%;
    bottom:0;
    border-radius:22px 22px 0 0;
    border-left:0; border-right:0;
  }
  .page {
    padding-right: 7px;
    padding-left: 7px;
  }
  .chk input { width: 14px; height: 14px; }
  .sheet-body{ grid-template-columns: 100px 1fr 80px; }
  .qbar{ right: 80px; }
  .trigger{bottom:18px}
}