/* ---------- ゴロ：解説の「✦ゴロ」と、押すと開くゴロ欄（js/goro.js・js/engine/goro.js） ----------
   赤はゴロ・答えだけ（ロゴの赤いロと同じ）。ゴロの行の見出しは薄い朱の帯。塗りの札は使わない。
   PC は言葉の近くに浮かせ、スマホは画面の下から出す。参考書のテーマの中には、そのまま置く（is-inline） */
.gr-key { text-decoration: underline; text-decoration-color: rgba(210, 60, 40, .5); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.gr-tag {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; margin: 0 3px 0 4px; padding: 0 7px 0 6px;
  border: 1px solid rgba(210, 60, 40, .38); border-radius: 999px; background: #fff3f0; color: #c2361f;
  font: 700 10.5px/1 var(--sans); letter-spacing: .06em; vertical-align: 3px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s; -webkit-user-select: none; user-select: none;
}
.gr-tag:hover, .gr-tag[aria-expanded="true"] { background: #d23c28; border-color: #d23c28; color: #fff; box-shadow: 0 4px 10px -4px rgba(210, 60, 40, .6); }
.gr-tag:focus-visible { outline: 2px solid #d23c28; outline-offset: 2px; }
.gr-star { flex: none; }
/* 押せる範囲は見た目より広く（指で押しやすく） */
.gr-tag { position: relative; }
.gr-tag::after { content: ""; position: absolute; inset: -12px -6px; }
.gr-line { margin-top: 10px; font-size: 13px; color: var(--fg-3); }

/* ゴロ欄 */
.gr-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; background: #fff; color: #131d1c;
  border: 1px solid #cfdcd9; border-radius: 12px; border-top: 3px solid #d23c28; text-align: left; letter-spacing: .02em;
  -webkit-user-select: text; user-select: text;
}
.gr-card:focus { outline: none; }
.gr-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gr-tb { display: flex; align-items: center; gap: 10px; padding: 11px 14px 10px 20px; border-bottom: 1px solid #e8eeec; }
.gr-tt { display: flex; flex-direction: column; gap: 1px; min-width: 0; margin-right: auto; }
.gr-t1 { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.gr-t1 b { font-size: 14px; font-weight: 900; color: #0f4f4b; line-height: 1.4; }
.gr-free { display: inline-flex; align-items: center; height: 17px; padding: 0 7px; border: 1px solid #9fc1bb; border-radius: 999px; font-size: 10px; font-weight: 700; color: #0f4f4b; white-space: nowrap; }
.gr-t2 { font-size: 11px; color: #8a9794; }
.gr-sheet {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid #dde6e4; border-radius: 999px;
  background: #fff; color: #46524f; font: 700 11.5px/1 var(--sans); cursor: pointer; transition: border-color .15s, color .15s;
}
.gr-sheet i { width: 12px; height: 9px; border-radius: 2px; background: #f1c9c1; }
.gr-sheet:hover { border-color: #d23c28; color: #b03a2b; }
.gr-sheet[aria-pressed="true"] { border-color: #d23c28; color: #b03a2b; }
.gr-sheet[aria-pressed="true"] i { background: #e06757; }
.gr-x { flex: none; width: 28px; height: 28px; border: 1px solid #dde6e4; border-radius: 50%; background: #fff; color: #6a7774; font: 600 14px/1 var(--num); cursor: pointer; }
.gr-x:hover { background: #eef3f2; color: #131d1c; }

.gr-qa { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px 2px; align-items: baseline; padding: 15px 20px 14px; }
.gr-qk, .gr-ak { font: 800 14px/1.6 var(--num); }
.gr-qk { color: #0f4f4b; }
.gr-ak { color: #d23c28; }
.gr-q { font-size: 14.5px; font-weight: 700; line-height: 1.6; word-break: auto-phrase; }
.gr-a { position: relative; justify-self: start; font-size: 15.5px; font-weight: 900; line-height: 1.55; color: #d23c28; word-break: auto-phrase; }
.gr-cover { display: none; position: absolute; inset: -2px -6px; border: 0; border-radius: 4px; background: #e06757; cursor: pointer; }
.gr-card.rs-on .gr-cover { display: block; }

.gr-body { position: relative; border-top: 1px solid #e8eeec; }
.gr-band { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 13px 20px 12px; background: #fcf6f4; border-bottom: 1px solid #f0e0db; }
.gr-bk { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: #9a7b74; }
.gr-w { font-size: 18px; font-weight: 900; line-height: 1.4; color: #d23c28; word-break: auto-phrase; }
.gr-w.is-latin { font: 800 24px/1 var(--num); letter-spacing: .06em; }
.gr-yomi { font-size: 12.5px; font-weight: 700; color: #6a7774; }
/* 対応表：左の頭文字の列は、いちばん長いものに合わせる */
.gr-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 11px 16px; align-items: baseline; padding: 16px 20px 14px; }
.gr-l { font: 600 15px/1.35 var(--num); color: #3a4644; max-width: 11em; word-break: auto-phrase; }
.gr-l b { font-weight: 800; color: #d23c28; font-family: var(--num); }
.gr-m { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gr-m b { font-size: 14.5px; font-weight: 900; line-height: 1.4; }
.gr-m small { font-size: 12.5px; line-height: 1.6; color: #5d6b68; }
.gr-rh { grid-column: 1 / -1; margin-top: 4px; padding-top: 10px; border-top: 1px solid #edf1f0; font-size: 12px; font-weight: 700; color: #9a7b74; letter-spacing: .06em; }
.gr-rh:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.gr-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin: 0 20px; padding: 12px 0 15px; border-top: 1px solid #edf1f0; }
.gr-note { flex: 1 1 16em; font-size: 12.5px; line-height: 1.7; color: #46524f; }
.gr-link { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: #0f4f4b; text-decoration: none; border-bottom: 1px solid #b9d1cc; padding-bottom: 1px; white-space: nowrap; }
.gr-link:hover { color: #0a3d3a; border-bottom-color: #0f4f4b; }

/* 有料のゴロ（使えない人）：中身は届いていないので、形だけをぼかして見せる */
.gr-ph { filter: blur(5px); opacity: .7; -webkit-user-select: none; user-select: none; pointer-events: none; }
.gr-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(251, 253, 252, .55); }
.gr-lock-in { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 15px 22px 14px; background: #fff; border: 1px solid #d6e2df; border-radius: 12px; box-shadow: 0 14px 30px -18px rgba(16, 42, 40, .35); text-align: center; }
.gr-lock-t { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 900; color: #131d1c; }
.gr-lock-t svg { color: #0f4f4b; }
.gr-lock-s { font-size: 12px; color: #46524f; }
.gr-cta { margin-top: 3px; padding: 8px 20px; border-radius: 999px; background: #0f4f4b; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; transition: background .15s; }
.gr-cta:hover { background: #0a3d3a; color: #fff; }

/* 浮かせて出すとき（PC）：言葉の下（入らなければ上）に、三角の印つき */
.gr-pop { position: absolute; z-index: 70; max-width: calc(100vw - 32px); }
.gr-pop .gr-card { box-shadow: 0 22px 44px -22px rgba(16, 42, 40, .38), 0 2px 6px -2px rgba(16, 42, 40, .08); max-height: calc(100vh - 32px); overflow-y: auto; }
.gr-pop::before {
  content: ""; position: absolute; left: var(--caret, 24px); top: -6px; z-index: 1; width: 12px; height: 12px; background: #d23c28; transform: rotate(45deg);
}
.gr-pop.is-above::before { top: auto; bottom: -6px; background: #fff; border-right: 1px solid #cfdcd9; border-bottom: 1px solid #cfdcd9; }
/* スマホ：画面の下から */
.gr-back { position: fixed; inset: 0; z-index: 69; background: rgba(16, 30, 28, .32); }
.gr-pop.is-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto !important; max-width: none; padding: 0 max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.gr-pop.is-sheet::before { display: none; }
.gr-pop.is-sheet .gr-card { max-height: 82vh; border-radius: 14px; animation: gr-up .22s ease-out; }
@keyframes gr-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gr-pop.is-sheet .gr-card { animation: none; } }

/* 参考書のテーマの中 */
.gr-inline { display: grid; gap: 12px; margin: 22px 0 6px; }
/* 参考書のテーマのゴロ：小さなボタンを1列に（押すとゴロ欄が開く） */
.gr-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.gr-tag.gr-qtag { height: auto; min-height: 26px; max-width: 100%; margin: 0; padding: 3px 10px 3px 8px; gap: 5px; font-size: 11px; vertical-align: 0; }
.gr-qtag .gr-qt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26em; font-weight: 500; letter-spacing: .02em; color: var(--fg-2, #46524f); }
.gr-qtag:hover .gr-qt, .gr-qtag[aria-expanded="true"] .gr-qt { color: inherit; }
.gr-inline > h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 900; color: #131d1c; }
.gr-inline > h2 .gr-tag { pointer-events: none; margin: 0; vertical-align: 0; }
.gr-card.is-inline { border-color: #dde6e4; border-top-color: #d23c28; }
@media (max-width: 479px) {
  .gr-tb { padding-left: 16px; }
  .gr-qa, .gr-band, .gr-rows { padding-left: 16px; padding-right: 16px; }
  .gr-foot { margin: 0 16px; }
  .gr-l { max-width: 7.5em; }
}
@media print { .gr-tag, .gr-pop, .gr-back { display: none !important; } }

/* 語呂合わせの一覧（#/goro・js/views/goro.js） */
.gl-sec { margin-top: 26px; }
.gl-sec > h2 { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; font-size: 15px; font-weight: 900; border-bottom: 1px solid var(--line); }
.gl-sec > h2 small { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--fg-3); }
.gl-free { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border: 1px solid #9fc1bb; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--accent); }
.gl-it { border-bottom: 1px solid var(--line); }
.gl-it > summary { display: flex; align-items: baseline; gap: 6px 16px; padding: 14px 4px; list-style: none; cursor: pointer; }
.gl-it > summary::-webkit-details-marker { display: none; }
.gl-it > summary::before { content: "+"; flex: none; width: 14px; font: 500 16px/1 var(--num); color: var(--fg-3); }
.gl-it[open] > summary::before { content: "−"; color: #d23c28; }
.gl-it > summary:hover .gl-q { color: var(--fg); }
.gl-it > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gl-q { flex: 1; min-width: 0; font-size: 14.5px; color: var(--fg-2); line-height: 1.6; }
.gl-t { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.gl-t .lk { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.gl-it[open] > summary .gl-q { color: var(--fg); font-weight: 700; }
.gl-it > .gr-card { margin: 0 0 16px; }
@media (max-width: 599px) {
  .gl-it > summary { flex-wrap: wrap; }
  .gl-t { width: 100%; padding-left: 30px; }
}
