/* BD Japanese — shared interface (app + teacher modules).
   Concept: 手帳, a student's study notebook. Deep pine ink on cool paper, hairline rules instead of shadows,
   one kanji seal per kind of work, and a red hanko that appears only when something is finished. */
:root {
  --bj-pine: #12312a;      /* brand ink: headings, dark panels */
  --bj-pine-2: #1b3f36;    /* raised surface on dark panels */
  --bj-moss: #1e7a52;      /* action green */
  --bj-mint: #8fd8b4;      /* accent on dark */
  --bj-leaf: #e6f0eb;      /* tinted fill */
  --bj-paper: #f3f6f4;     /* page ground */
  --bj-card: #ffffff;
  --bj-line: #dde6e1;
  --bj-line-2: #eef3f0;
  --bj-ink: #14231f;
  --bj-mute: #5b6e66;
  --bj-faint: #95a8a0;
  --bj-stamp: #c3102f;     /* hanko red: completion and warnings only */
  --bj-stamp-s: #fcebef;
  --bj-gold: #b8862b;
  --bj-r-tile: 10px;
  --bj-r-panel: 16px;
  --bj-r-btn: 12px;
  --bj-sans: "Hind Siliguri", "Noto Sans Bengali", "Noto Sans JP", system-ui, sans-serif;
  --bj-head: "Anek Bangla", "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
  --bj-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --bj-mincho: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --bj-nav-h: 64px;
  --bj-bar-h: 54px;
  --bj-ease: cubic-bezier(.2, .8, .2, 1);
}

.bj, .bj *, .bj *::before, .bj *::after { box-sizing: border-box; }
.bj { font-family: var(--bj-sans); color: var(--bj-ink); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
.bj a { text-decoration: none; }
.bj [hidden] { display: none !important; }
.bj h1, .bj h2, .bj h3, .bj p { margin: 0; }
.bj .bj-i { flex: none; display: block; }
.bj :focus-visible, .bj-nav :focus-visible, .bj-bar :focus-visible { outline: 2px solid var(--bj-moss); outline-offset: 2px; border-radius: 8px; }
.bj-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bj-num { font-family: var(--bj-head); font-variant-numeric: tabular-nums; }

/* ---- buttons ---- */
.bj-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: var(--bj-r-btn); background: var(--bj-moss); color: #fff !important; font: 600 1rem/1.2 var(--bj-head); letter-spacing: .005em; cursor: pointer; transition: background .15s, transform .12s var(--bj-ease); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.bj-btn:hover { background: var(--bj-pine); }
.bj-btn:active { transform: scale(.98); }
.bj-btn:disabled { opacity: .45; cursor: not-allowed; }
.bj-btn.line { background: transparent; color: var(--bj-pine) !important; box-shadow: inset 0 0 0 1.5px var(--bj-line); }
.bj-btn.line:hover { background: var(--bj-card); box-shadow: inset 0 0 0 1.5px var(--bj-pine); }
.bj-btn.on-dark { background: #fff; color: var(--bj-pine) !important; }
.bj-btn.on-dark:hover { background: var(--bj-leaf); }
.bj-btn.ghost-dark { background: rgba(255, 255, 255, .08); color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.bj-btn.ghost-dark:hover { background: rgba(255, 255, 255, .14); }
.bj-btn.sm { min-height: 38px; padding: 0 14px; font-size: .92rem; border-radius: 10px; }
.bj-btn.block { width: 100%; }

/* ---- the seal tile: one kanji per kind of step ---- */
.bj-tile { flex: none; width: 44px; height: 44px; border-radius: var(--bj-r-tile); background: var(--bj-leaf); color: var(--bj-pine); display: grid; place-items: center; font: 900 1.3rem/1 var(--bj-mincho); }
.bj-tile.sm { width: 34px; height: 34px; font-size: 1rem; border-radius: 9px; }

/* ---- hanko stamp ---- */
.bj-stamp { --s: 34px; flex: none; width: var(--s); height: var(--s); border-radius: 50%; border: 1.5px solid var(--bj-stamp); outline: 1px solid rgba(195, 16, 47, .45); outline-offset: -4.5px; color: var(--bj-stamp); display: grid; place-items: center; font: 900 calc(var(--s) * .42)/1 var(--bj-mincho); transform: rotate(-8deg); background: transparent; }
.bj-stamp.lg { --s: 52px; }
.bj-stamp.sm { --s: 22px; outline-offset: -3px; }
.bj-stamp.fill { background: var(--bj-stamp); color: #fff; outline-color: rgba(255, 255, 255, .55); }
@keyframes bj-press { 0% { transform: rotate(-8deg) scale(1.9); opacity: 0; } 55% { transform: rotate(-8deg) scale(.92); opacity: 1; } 100% { transform: rotate(-8deg) scale(1); } }
.bj-stamp.press { animation: bj-press .42s var(--bj-ease) both; }

/* ---- small parts ---- */
.bj-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 6px; background: var(--bj-leaf); color: var(--bj-pine); font: 600 .76rem/1 var(--bj-head); letter-spacing: .01em; white-space: nowrap; }
.bj-chip.dark { background: var(--bj-pine); color: #fff; }
.bj-chip.red { background: var(--bj-stamp-s); color: var(--bj-stamp); }
.bj-chip.free { background: #edf1ef; color: var(--bj-mute); }
.bj-chip.gold { background: #f7efdc; color: #8a6118; }
.bj-meter { display: flex; gap: 3px; }
.bj-meter i { flex: 1; height: 5px; border-radius: 3px; background: var(--bj-line); }
.bj-meter i.on { background: var(--bj-moss); }
.bj-bar-p { height: 6px; border-radius: 3px; background: var(--bj-line-2); overflow: hidden; }
.bj-bar-p > i { display: block; height: 100%; border-radius: inherit; background: var(--bj-moss); }
.bj-ava { border-radius: 50%; object-fit: cover; background: var(--bj-leaf); display: block; }
.bj-toast { position: fixed; left: 50%; bottom: calc(var(--bj-nav-h) + 18px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); background: var(--bj-pine); color: #fff; padding: 11px 18px; border-radius: 12px; font: 600 .92rem/1.4 var(--bj-sans); opacity: 0; transition: .24s var(--bj-ease); z-index: 1000001; pointer-events: none; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 10px 30px -12px rgba(18, 49, 42, .5); }
.bj-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- page parts ---- */
.bj-h1 { font: 600 1.6rem/1.25 var(--bj-head); color: var(--bj-pine); letter-spacing: -.005em; }
.bj-h2 { font: 600 1.08rem/1.35 var(--bj-head); color: var(--bj-pine); margin-bottom: 10px; }
.bj-eyebrow { display: block; font: 500 .8rem/1.3 var(--bj-head); color: var(--bj-mute); letter-spacing: .02em; }
.bj-sec { margin-top: 28px; }
.bj-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bj-sh a { color: var(--bj-moss) !important; font: 600 .9rem var(--bj-head); }
.bj-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.bj-list { background: var(--bj-card); border: 1px solid var(--bj-line); border-radius: var(--bj-r-panel); overflow: hidden; }
.bj-row { display: flex; align-items: center; gap: 13px; min-height: 64px; padding: 11px 14px; border-bottom: 1px solid var(--bj-line-2); color: var(--bj-ink) !important; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background .12s; }
.bj-list > .bj-row:last-child, .bj-list > details:last-child > .bj-row:last-child { border-bottom: 0; }
a.bj-row:hover, a.bj-row:active, summary.bj-row:hover { background: #f8faf9; }
.bj-row.slim { min-height: 50px; }
.bj-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bj-row-t b { font: 600 1rem/1.35 var(--bj-head); }
.bj-row-t small { color: var(--bj-mute); font-size: .84rem; line-height: 1.45; }
.bj-row-n { font: 600 .82rem var(--bj-head); color: var(--bj-mute); white-space: nowrap; }
.bj-row-c { color: #a9bab3; }
.bj-ic { background: var(--bj-leaf); color: var(--bj-pine); }
.bj-row.sensei { background: var(--bj-card); border: 1px solid var(--bj-line); border-radius: var(--bj-r-panel); }

.bj-sample { margin: 0; padding: 16px 16px 12px; background: var(--bj-card); border: 1px solid var(--bj-line); border-radius: 20px; box-shadow: 0 24px 50px -32px rgba(18, 49, 42, .35); }
.bj-sample-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.bj-sample-h b { font: 600 1rem var(--bj-head); color: var(--bj-pine); }
.bj-sample-h span { font: 500 .72rem/1.8 var(--bj-head); color: var(--bj-mute); border: 1px dashed var(--bj-line); border-radius: 6px; padding: 0 7px; }
.bj-sample-l { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--bj-line-2); }
.bj-sample-l li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bj-line-2); }
.bj-sample-l li:last-child { border-bottom: 0; }
.bj-sample-l li > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bj-sample-l b { font: 600 .96rem var(--bj-head); }
.bj-sample-l small { color: var(--bj-mute); font-size: .82rem; }
.bj-sample-l .now b { color: var(--bj-moss); }
.bj-sample-l .now > svg { color: var(--bj-moss); }
.bj-sample-l li > svg:last-child { color: #a9bab3; }
.bj-sample-l .done .bj-tile { background: var(--bj-moss); color: #fff; }
.bj-sample figcaption { margin-top: 8px; font-size: .84rem; color: var(--bj-mute); }

.bj-seg { display: flex; gap: 2px; padding: 3px; margin: 12px 0 16px; background: #e7eeea; border-radius: 12px; }
.bj-seg button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--bj-mute); font: 600 .94rem var(--bj-head); cursor: pointer; transition: background .15s, color .15s; }
.bj-seg button[aria-selected="true"] { background: #fff; color: var(--bj-pine); box-shadow: 0 1px 2px rgba(18, 49, 42, .12); }
.bj-form { display: grid; gap: 12px; padding: 6px 14px 16px; background: var(--bj-card); border-bottom: 1px solid var(--bj-line-2); }
.bj-form label { display: grid; gap: 5px; font: 500 .86rem var(--bj-head); color: var(--bj-mute); }
.bj-form input, .bj-form select { font: 400 1rem var(--bj-sans); color: var(--bj-ink); min-height: 46px; padding: 8px 12px; border: 1.5px solid var(--bj-line); border-radius: 11px; background: #fff; }
.bj-form input:focus, .bj-form select:focus { outline: 0; border-color: var(--bj-moss); box-shadow: 0 0 0 3px rgba(30, 122, 82, .15); }
.bj-form .bj-btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) {
  .bj *, .bj-nav *, .bj-bar * { animation: none !important; transition: none !important; }
}

/* ---- the weekday strip: 月火水木金土日 ---- */
.bj-week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bj-week li { position: relative; display: grid; place-items: center; padding-bottom: 9px; }
.bj-week .bj-stamp { --s: 36px; }
.bj-wk { width: 36px; height: 36px; border-radius: 50%; border: 1.5px dashed #c9d6cf; display: grid; place-items: center; color: var(--bj-mute); font: 700 .95rem/1 var(--bj-mincho); }
.bj-week .future .bj-wk { border-color: transparent; color: #a6b7b0; }
.bj-week .today .bj-wk { border: 1.5px solid var(--bj-pine); color: var(--bj-pine); }
.bj-week .today::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; border-radius: 50%; margin-left: -2px; background: var(--bj-pine); }
.bj-week .today.on::after { background: var(--bj-stamp); }
@media (max-width: 360px) { .bj-week .bj-stamp, .bj-wk { --s: 32px; width: 32px; height: 32px; } }
