/* 🇯🇵 Life in Japan (日本の生活ガイド) — includes/life-japan.php আর japan-*-rules / manners পাতাগুলো */

.lj-hero h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.lj-h1-jp { font-size: 0.55em; font-weight: 500; opacity: 0.8; }
.lj-lead { opacity: 0.88; max-width: 62ch; line-height: 1.75; }

/* পাতাগুলোর ট্যাব */
.lj-tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.lj-tabs-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-top: 6px; padding-bottom: 0; }
.lj-tabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px 11px; color: var(--sumi-soft); text-decoration: none;
             font-weight: 600; font-size: 0.92rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.lj-tabs a small { font-weight: 500; font-size: 0.78rem; opacity: 0.8; }
.lj-tabs a:hover { color: var(--ai); }
.lj-tabs a.on { color: var(--ai); border-bottom-color: var(--ai); }
.lj-tabs a:focus-visible { outline: 2px solid var(--shu); outline-offset: -2px; }

.lj-top { padding-top: 34px; }
.lj-narrow { max-width: 900px; }

/* 「このページについて」 — জাপানের স্কুলের জন্য এক নজরে সারাংশ */
.lj-about { border: 1px solid var(--line); border-left: 4px solid #C8102E; background: #fff; border-radius: 8px; padding: 16px 20px 14px; margin-bottom: 34px; }
.lj-about-h { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: #C8102E; margin-bottom: 6px; }
.lj-about p { margin: 0 0 6px; line-height: 1.8; color: var(--sumi); }
.lj-about ul { list-style: disc; margin: 4px 0 6px; padding-left: 1.2em; color: var(--sumi); line-height: 1.8; }
.lj-about-f { font-size: 0.78rem; color: var(--sumi-soft); margin-top: 6px; }

/* ভাগের শিরোনাম */
.lj-h2 { font-family: var(--font-display); font-size: 1.45rem; color: var(--sumi); margin: 46px 0 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; scroll-margin-top: 70px; }
.lj-num { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border-radius: 50%; background: var(--ai); color: #fff; font-size: 0.95rem; font-weight: 700; align-self: center; }
.lj-jp { font-size: 0.68em; font-weight: 500; color: var(--sumi-soft); }
.lj-point { font-size: 0.86rem; color: var(--sumi-soft); margin: 0 0 16px; }
.lj-point b { display: inline-block; font-size: 0.72rem; color: #fff; background: var(--sumi-soft); border-radius: 3px; padding: 0 6px; margin-right: 8px; }
.lj-narrow > p, .lj-text { line-height: 1.85; color: var(--sumi); }

/* নিয়মের কার্ড */
.lj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 14px 0; }
.lj-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 16px 14px; }
.lj-card .ic { font-size: 1.7rem; line-height: 1; margin-bottom: 8px; display: block; }
.lj-card h3 { font-size: 1.02rem; margin: 0 0 2px; color: var(--sumi); }
.lj-card .jp { display: block; font-size: 0.8rem; color: var(--sumi-soft); margin-bottom: 8px; }
.lj-card p, .lj-card ul { margin: 0; font-size: 0.92rem; color: var(--sumi); line-height: 1.7; }
.lj-card ul { list-style: disc; padding-left: 1.1em; }
.lj-card li, .lj-ok li, .lj-ng li, .lj-about li { margin: 2px 0; }

/* ⭕ ভালো / ❌ খারাপ উদাহরণ — জাপানে ○×-ই সবাই বোঝে */
.lj-dd { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 6px; }
.lj-ok, .lj-ng { border-radius: 10px; padding: 14px 16px; line-height: 1.7; font-size: 0.93rem; }
.lj-ok { background: var(--matcha-tint); border: 1px solid #C7E1D2; }
.lj-ng { background: var(--danger-tint); border: 1px solid #EECFCA; }
.lj-ok b, .lj-ng b { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.lj-ok b { color: var(--matcha); } .lj-ng b { color: var(--danger); }
.lj-ok ul, .lj-ng ul { list-style: disc; margin: 0; padding-left: 1.2em; }

/* ছবি/নকশা */
.lj-fig { margin: 18px 0 10px; background: var(--washi-alt); border-radius: 12px; padding: 18px 16px 12px; text-align: center; }
.lj-fig svg { width: 100%; height: auto; max-width: 760px; display: block; margin: 0 auto; }
.lj-fig figcaption { font-size: 0.85rem; color: var(--sumi-soft); margin-top: 8px; line-height: 1.6; }

/* টেবিল */
.lj-table-w { overflow-x: auto; margin: 12px 0; }
.lj-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: #fff; }
.lj-table th, .lj-table td { border: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; line-height: 1.6; }
.lj-table th { background: var(--ai); color: #fff; font-weight: 600; }
.lj-table td small { color: var(--sumi-soft); }
.lj-table .fine { font-weight: 700; color: var(--danger); white-space: nowrap; }

/* ধাপ */
.lj-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; counter-reset: ljs; margin: 12px 0; }
.lj-step { counter-increment: ljs; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center; }
.lj-step .ic { font-size: 2rem; display: block; margin-bottom: 4px; height: 2.4rem; }
.lj-step .lj-ico { width: 2.5rem; height: 2.5rem; display: inline-block; }
.lj-step::before { content: counter(ljs); display: block; font-weight: 700; color: var(--ai); font-size: 0.8rem; margin-bottom: 2px; }
.lj-step b { display: block; font-size: 0.95rem; }
.lj-step span.jp { display: block; font-size: 0.78rem; color: var(--sumi-soft); }
.lj-step p { margin: 6px 0 0; font-size: 0.86rem; color: var(--sumi); line-height: 1.6; }

/* জাপানি বাক্য — উচ্চারণসহ */
.lj-say { display: grid; gap: 8px; margin: 12px 0; }
.lj-say div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.lj-say .ja { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--sumi); }
.lj-say .ja small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.8rem; color: var(--sumi-soft); }
.lj-say .bn { font-size: 0.92rem; color: var(--sumi); }

.lj-tip { background: #FFF7E0; border: 1px solid #F0DFAE; border-radius: 10px; padding: 12px 16px; margin: 14px 0; line-height: 1.75; font-size: 0.93rem; }
.lj-tip b { color: #8A5E00; }

.lj-remember { margin-top: 46px; background: var(--ai); color: #fff; border-radius: 12px; padding: 20px 22px; line-height: 1.8; }
.lj-remember span { display: block; margin-top: 6px; opacity: 0.8; font-size: 0.9rem; }
.lj-pn { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.lj-pn a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ai); font-weight: 600; background: #fff; }
.lj-pn a small { color: var(--sumi-soft); font-weight: 500; }
.lj-pn a:hover { border-color: var(--ai); }

@media (max-width: 640px) {
  .lj-dd { grid-template-columns: 1fr; }
  .lj-say div { grid-template-columns: 1fr; }
  .lj-h2 { font-size: 1.22rem; margin-top: 36px; }
  .lj-about { padding: 14px 15px 12px; }
}
@media print { .lj-tabs, .lj-pn { display: none; } }

/* ---------- 🔊 জাপানি লেখা + রোমাজি (includes/life-japan-ja.php) ---------- */
.lj-ja { white-space: normal; }
.lj-ja ruby { ruby-position: under; -webkit-ruby-position: after; ruby-align: center; }
.lj-ja rt { font-family: var(--font-body); font-size: 0.6em; font-weight: 500; color: var(--sumi-soft); letter-spacing: 0; line-height: 1.3; padding-top: 1px; }
.page-hero .lj-ja rt, .lj-remember .lj-ja rt, .page-hero .lj-ro, .lj-remember .lj-ro { color: rgba(255,255,255,0.72); }
.lj-ja-long .lj-ro { display: block; font-family: var(--font-body); font-size: 0.82em; font-weight: 500; color: var(--sumi-soft); font-style: italic; line-height: 1.55; margin-top: 2px; }
.lj-spk { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; min-width: 22px; min-height: 22px;
          margin: 0 2px 0 4px; padding: 0; border: 0; border-radius: 50%; background: var(--ai-tint); font-size: 0.72em; line-height: 1;
          cursor: pointer; vertical-align: middle; transition: transform .12s ease, background .12s ease; }
.lj-spk:hover { background: #D3DDEB; }
.lj-spk:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; }
.lj-spk.on { background: #C8102E; transform: scale(1.12); }
.lj-spk.big { font-size: 0.95rem; width: 34px; height: 34px; }
.page-hero .lj-spk, .lj-remember .lj-spk { background: rgba(255,255,255,0.16); }
.lj-say div { grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1fr); }
.lj-note { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 9999; max-width: min(92vw, 520px);
           background: #16233D; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 0.92rem; line-height: 1.6; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: opacity .5s; }
.lj-note.out { opacity: 0; }

/* ---------- 📚 শব্দের তালিকা ---------- */
.lj-vocab, .lj-quiz { border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 8px; background: #fff; margin: 0 0 30px; }
.lj-vocab { border-top: 4px solid var(--ai); }
.lj-vocab-h, .lj-quiz-h { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--sumi); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.lj-vocab-h span, .lj-quiz-h span { font-size: 0.78rem; font-weight: 500; color: var(--sumi-soft); }
.lj-vocab-p { font-size: 0.9rem; color: var(--sumi-soft); margin: 6px 0 10px; line-height: 1.7; }
.lj-vt td { vertical-align: middle; }
.lj-vt .ja { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--sumi); white-space: nowrap; }
.lj-vt .ro { font-style: italic; color: var(--ai); white-space: nowrap; }
.lj-vt .c { text-align: center; width: 56px; }
.lj-vt th.c { color: #fff; }

/* ---------- 🧠 কুইজ ---------- */
.lj-quiz { margin-top: 46px; border-top: 4px solid #C8102E; padding-bottom: 18px; }
.lj-quiz-body { margin-top: 8px; }
.lq-top { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--sumi-soft); font-weight: 600; }
.lq-bar { height: 6px; background: var(--washi-alt); border-radius: 3px; overflow: hidden; margin: 6px 0 16px; }
.lq-bar i { display: block; height: 100%; background: #C8102E; transition: width .3s; }
.lq-q { text-align: center; margin-bottom: 14px; }
.lq-ask { font-size: 0.9rem; color: var(--sumi-soft); margin-bottom: 6px; }
.lq-ja { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--sumi); display: inline-flex; align-items: center; gap: 8px; }
.lq-bn { font-size: 1.4rem; font-weight: 700; color: var(--sumi); }
.lq-hint { margin-top: 4px; color: var(--ai); font-style: italic; }
.lq-hint-btn { margin-top: 6px; border: 0; background: none; color: var(--shu); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.lq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lq-opt { font: inherit; font-size: 1rem; text-align: center; padding: 14px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--sumi); cursor: pointer; line-height: 1.4; }
.lq-opt:hover:not(:disabled) { border-color: var(--ai); background: var(--ai-tint); }
.lq-opt:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; }
.lq-opt .lq-oja { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.lq-opt small { display: block; color: var(--sumi-soft); font-style: italic; }
.lq-opt.ok { border-color: var(--matcha); background: var(--matcha-tint); }
.lq-opt.ng { border-color: var(--danger); background: var(--danger-tint); }
.lq-opt:disabled { cursor: default; }
.lq-fb { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.lq-yes, .lq-no { border-radius: 10px; padding: 10px 14px; line-height: 1.7; width: 100%; box-sizing: border-box; }
.lq-yes { background: var(--matcha-tint); color: var(--matcha); }
.lq-no { background: var(--danger-tint); color: var(--danger); }
.lq-res { text-align: center; }
.lq-score { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--ai); }
.lq-msg { font-size: 1.05rem; margin-bottom: 12px; }
.lq-wrong { text-align: left; background: var(--washi-alt); border-radius: 10px; padding: 12px 16px; margin: 10px 0 14px; }
.lq-wrong ul { list-style: disc; padding-left: 1.2em; margin: 6px 0 0; line-height: 1.9; }
.lq-wrong span[lang] { font-family: var(--font-display); font-weight: 700; }
.lq-wrong small { color: var(--sumi-soft); }
.lq-again { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 640px) {
  .lq-opts { grid-template-columns: 1fr; }
  .lq-ja { font-size: 1.7rem; }
  .lj-say div { grid-template-columns: 1fr auto; }
  .lj-say .bn { grid-column: 1 / -1; }
}

/* মোবাইলে শব্দের তালিকা — টেবিল নয়, প্রতিটা শব্দ একটা ছোট কার্ড */
@media (max-width: 640px) {
  .lj-vt thead { display: none; }
  .lj-vt, .lj-vt tbody { display: block; }
  .lj-vt tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
  .lj-vt td { border: 0; padding: 0; }
  .lj-vt td.ja { grid-column: 1; grid-row: 1; font-size: 1.3rem; }
  .lj-vt td.c { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: auto; }
  .lj-vt td:nth-child(2) { grid-column: 1; font-size: 0.9rem; color: var(--sumi-soft); }
  .lj-vt td.ro { grid-column: 1; margin-top: -2px; }
  .lj-vt td:nth-child(4) { grid-column: 1; font-weight: 600; }
}

/* 🏪 প্যাকেটের লেবেলের উদাহরণ (コンビニ পাতা) */
.lj-label { max-width: 520px; margin: 0 auto 0.6rem; background: #fff; border: 2px solid #16233D; border-radius: 6px; padding: 0.7rem 0.9rem; font-family: "Noto Sans JP", "Inter", sans-serif; font-size: 0.95rem; line-height: 1.8; }
.lj-label-h { border-bottom: 1px solid #16233D; padding-bottom: 0.3rem; margin-bottom: 0.4rem; font-weight: 700; }
.lj-label mark { background: #FDE2E2; color: #B3261E; font-weight: 700; padding: 0 3px; border-radius: 3px; }

/* ১০টা ট্যাব — বড় স্ক্রিনে দুই লাইনে ভাঙবে, মোবাইলে পাশে স্ক্রল */
@media (min-width: 900px) {
  .lj-tabs-in { flex-wrap: wrap; overflow-x: visible; column-gap: 2px; row-gap: 0; }
  .lj-tabs a { padding: 9px 11px 8px; }
}

/* গাঢ় নীল বাক্সে লম্বা বাক্যের রোমাজিও যেন পরিষ্কার পড়া যায় */
.lj-remember .lj-ja-long .lj-ro, .page-hero .lj-ja-long .lj-ro { color: rgba(255,255,255,0.75); }

/* 📘 জাপান গাইড মোড (SMS-এর লিংকে ঢুকলে) */
.lj-guide { background:#FFF8E6; border:1px solid #F0D08A; border-left:5px solid #E0A100; border-radius:12px; padding:14px 18px; margin-bottom:18px; }
.lj-guide.is-done { background:#EAF5EE; border-color:#B9DCC5; border-left-color:#2E7D32; }
.lj-guide-h { font-weight:700; color:var(--sumi); }
.lj-guide-h small { font-weight:500; color:var(--sumi-soft); }
.lj-guide p { margin:6px 0 10px; line-height:1.7; }
.lj-guide-a { display:flex; flex-wrap:wrap; gap:8px; }
.lq-guide { margin:12px auto 4px; max-width:520px; padding:10px 14px; border-radius:10px; background:#EEF2F8; font-weight:600; line-height:1.6; }
.lq-guide.ok { background:#E4F3E8; color:#1E6B34; }
.lq-guide.no { background:#FFF1E6; color:#9A4A00; }
