/* Stats + Teacher (Posta) screens */
.mb-scroll { flex: 1; min-height: 0; padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.mb-sec-t { font-size: 18px; color: var(--teal); margin: 0 0 6px; text-align: center; text-shadow: 0 1px 0 #fff; }
.mb-card { padding: 4px 6px; animation: popin .28s cubic-bezier(.3,1.6,.5,1) both; }
.mb-chips { display: flex; gap: 6px; padding: 2px 12px 4px; overflow-x: auto; scrollbar-width: none; }
.mb-chips::-webkit-scrollbar { display: none; }
.mb-chips .chip { height: 44px; padding: 0 12px; flex: none; font-size: 15px; border-color: transparent; }
.mb-chips .chip.on { border-color: var(--teal); background: #eafaf5; box-shadow: 0 0 10px rgba(84,224,207,.55); }
.mb-radar { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.mb-streak { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.mb-streak .chip { font-size: 15px; }
.mb-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mb-cal-h { text-align: center; font-size: 12px; font-weight: 900; color: var(--text2); }
.mb-cal-m { grid-column: 1 / -1; font-size: 13px; font-weight: 900; color: var(--teal); padding: 4px 2px 0; }
.mb-day { min-height: 40px; min-width: 0; border: 2px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 800; color: var(--text2); cursor: pointer; padding: 0; }
.mb-day.empty { visibility: hidden; pointer-events: none; }
.mb-day.l0 { background: #fff3dc; } .mb-day.l1 { background: #dcf3ea; } .mb-day.l2 { background: #bfe8dc; }
.mb-day.l3 { background: #7fd0c2; color: #24615b; } .mb-day.l4 { background: #3d8f86; color: #fff; }
.mb-day.today { border-color: var(--apricot2); box-shadow: 0 0 6px rgba(245,164,107,.8); }
.mb-legend { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 6px; font-size: 12px; color: var(--text2); }
.mb-legend i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.mb-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mb-tile { padding: 8px 6px; border-radius: 14px; background: rgba(255,250,240,.9); border: 2px solid #f0dcc0; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.mb-tile b { font-size: 22px; color: var(--teal); }
.mb-tile span { font-size: 14px; color: var(--text2); font-weight: 800; }
.mb-lrow { display: grid; grid-template-columns: 34px 1fr; gap: 4px 10px; align-items: center; padding: 6px 2px; }
.mb-lrow .flag { font-size: 28px; grid-row: span 2; }
.mb-lrow-t { display: flex; justify-content: space-between; gap: 6px; font-size: 14px; font-weight: 900; }
.mb-lrow-t small { font-size: 13px; color: var(--text2); font-weight: 800; }
.mb-bar { height: 12px; border-radius: 6px; background: #eadfcd; overflow: hidden; }
.mb-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--mint2), var(--ink-glow)); transition: width .6s cubic-bezier(.3,1.2,.5,1); }

/* teacher */
.mb-head { display: flex; align-items: flex-end; gap: 8px; padding: 0 12px; flex: none; }
.mb-portrait { flex: none; filter: drop-shadow(0 3px 4px rgba(90,60,30,.25)); }
.mb-hbubble { position: relative; flex: 1; min-height: 44px; margin-bottom: 14px; padding: 8px 12px; border-radius: 16px; background: #fffaf0; border: 2px solid var(--mint2); font-size: 14px; font-weight: 800; line-height: 1.35; box-shadow: 0 2px 6px rgba(90,60,30,.15); }
.mb-hbubble::before { content: ""; position: absolute; left: -9px; bottom: 12px; border: 7px solid transparent; border-right-color: var(--mint2); border-left: 0; }
.mb-hbubble b { display: block; font-size: 13px; color: var(--teal); }
.mb-log { flex: 1; min-height: 0; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; border-radius: 16px; margin: 0 8px; background: rgba(255,250,240,.55); }
.mb-msg { max-width: 88%; padding: 8px 12px; border-radius: 16px; font-size: 15px; line-height: 1.45; animation: popin .22s cubic-bezier(.3,1.6,.5,1) both; word-break: break-word; user-select: text; -webkit-user-select: text; }
.mb-msg.posta { align-self: flex-start; background: #fffaf0; border: 2px solid var(--mint2); border-bottom-left-radius: 4px; }
.mb-msg.npc { align-self: flex-start; background: #fff0e2; border: 2px solid var(--apricot); border-bottom-left-radius: 4px; }
.mb-msg.me { align-self: flex-end; background: #d9f4ec; border: 2px solid var(--teal); border-bottom-right-radius: 4px; }
.mb-msg small, .mb-note { display: block; font-size: 13px; color: var(--text2); font-weight: 700; }
.mb-msg h4 { margin: 0 0 4px; font-size: 16px; color: var(--teal); }
.mb-pat { display: inline-block; padding: 2px 8px; margin: 2px 0; border-radius: 8px; background: #eafaf5; border: 1px dashed var(--teal); font-weight: 900; }
.mb-ex { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.mb-ex > div { flex: 1; min-width: 0; }
.mb-ex b { display: block; font-size: 16px; }
.mb-say { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--mint2); background: #fff; font-size: 18px; cursor: pointer; padding: 0; }
.mb-say:active { transform: scale(.9); }
.mb-block { align-self: stretch; display: flex; flex-direction: column; gap: 6px; animation: popin .22s cubic-bezier(.3,1.6,.5,1) both; }
.mb-block.mb-grid { max-height: 44vh; overflow-y: auto; scrollbar-width: none; }
.mb-opt { min-height: 48px; padding: 8px 14px; border-radius: 14px; border: 2px solid #f0dcc0; background: #fffaf0; font-size: 16px; font-weight: 800; text-align: left; cursor: pointer; transition: transform .12s, box-shadow .15s; line-height: 1.3; }
.mb-opt small { display: block; font-size: 13px; color: var(--text2); font-weight: 700; }
.mb-opt:hover:not([disabled]) { border-color: var(--teal); }
.mb-opt:active:not([disabled]) { transform: scale(.97); }
.mb-opt.ok { border-color: var(--good); background: #e4f8ee; box-shadow: 0 0 12px rgba(84,224,207,.8); }
.mb-opt.bad { border-color: var(--bad); background: #fde8e8; animation: mbshake .35s; }
.mb-opt[disabled] { opacity: .75; cursor: default; }
.mb-quiz-s { font-size: 18px; font-weight: 900; padding: 4px 2px; }
.mb-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mb-opts .mb-opt { text-align: center; font-size: 18px; }
.mb-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mb-row .btn { flex: 1; }
.mb-input { width: 100%; min-height: 76px; resize: none; padding: 10px 12px; border-radius: 14px; border: 3px solid var(--teal); background: linear-gradient(#fffdf6, #fff6e2); font-family: var(--font); font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.4; outline: none; user-select: text; -webkit-user-select: text; box-shadow: inset 0 2px 6px rgba(90,60,30,.12); }
.mb-input:focus { box-shadow: 0 0 12px var(--ink-glow), inset 0 2px 6px rgba(90,60,30,.12); }
.mb-diff { font-size: 16px; line-height: 1.8; margin: 2px 0; }
.mb-diff em { font-style: normal; font-size: 12px; font-weight: 900; color: var(--text2); margin-right: 6px; }
.mb-diff .del { color: var(--bad); text-decoration: line-through; font-weight: 900; }
.mb-diff .add { color: #1d7d73; background: rgba(84,224,207,.3); border-radius: 4px; font-weight: 900; }
.mb-tips { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.mb-modes { flex: none; display: flex; gap: 6px; padding: 6px 8px 4px; }
.mb-modes .btn { flex: 1; min-width: 0; min-height: 52px; padding: 2px 4px; font-size: 14px; border-width: 12px; }
.mb-modes .btn.on { filter: saturate(1.2) drop-shadow(0 0 8px var(--ink-glow)); }
@keyframes mbshake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
