/* meta-a: hero + review screens (classes prefixed ma-) */
.ma-scroll { flex: 1; min-height: 0; padding: 0 12px 14px; }
.ma-body { padding-top: 10px; }
.ma-pop { animation: maPop .26s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes maPop { 0% { transform: translateY(12px) scale(.9); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* hero card */
.ma-herocard { display: flex; align-items: center; gap: 4px; padding: 8px 12px 8px 4px; margin-top: 4px; border-radius: 24px; border: 3px solid #fff;
  background: linear-gradient(135deg, #e7f8f2, #fff3df 70%, #fde2e8); box-shadow: 0 4px 12px rgba(90,60,30,.16); }
.ma-hero-cv { flex: none; }
.ma-hero-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ma-hero-name { display: flex; align-items: baseline; gap: 8px; }
.ma-hero-name b { font-size: 24px; color: var(--teal); }
.ma-lv { font-size: 16px; background: var(--apricot); color: #fff; border-radius: 10px; padding: 1px 8px; text-shadow: 0 1px 0 #b8603a; }
.ma-title-line { font-size: 14px; font-weight: 800; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-xp { display: flex; align-items: center; gap: 6px; }
.ma-xpbar { flex: 1; height: 12px; border-radius: 6px; background: #eadfcd; overflow: hidden; }
.ma-xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint2), var(--ink-glow)); border-radius: 6px; transition: width .6s; }
.ma-xp em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--text2); }
.ma-pts { font-size: 14px; font-weight: 900; color: var(--teal); }

/* tabs */
.ma-tabs { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 0 6px; background: linear-gradient(#fdf1dc 82%, rgba(253,241,220,0)); }
.ma-tabs4 { grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ma-tab { min-height: 44px; padding: 2px 4px; border-radius: 14px; border: 2px solid #f0dcc0; background: #fffaf0; font-size: 15px; font-weight: 900; color: var(--text2); cursor: pointer; transition: transform .12s, background .15s; }
.ma-tabs4 .ma-tab { font-size: 14px; }
.ma-tab span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-tab.on { background: var(--mint); border-color: var(--teal); color: var(--teal); box-shadow: 0 0 10px rgba(84,224,207,.5); }
.ma-tab:active { transform: scale(.94); }

/* skill tree (branch colours follow content/skills.json order) */
.ma-tree { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ma-branch { --bc: #4fb8a8; display: flex; flex-direction: column; align-items: center; }
.ma-branch:nth-child(2) { --bc: #e88a5a; }
.ma-branch:nth-child(3) { --bc: #8d7ad6; }
.ma-branch-t { width: 100%; text-align: center; font-size: 14px; font-weight: 900; color: #fff; background: var(--bc); border-radius: 12px; padding: 5px 2px; margin-bottom: 8px; text-shadow: 0 1px 0 rgba(0,0,0,.25); line-height: 1.2; }
.ma-node { width: 100%; min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; border-radius: 18px; border: 3px solid var(--bc); background: #fffaf0; cursor: pointer; transition: transform .12s; }
.ma-node-ic { font-size: 26px; line-height: 1; }
.ma-node-n { font-size: 14px; font-weight: 900; line-height: 1.15; text-align: center; }
.ma-node small { font-size: 13px; font-weight: 800; color: var(--text2); }
.ma-node.learned { background: color-mix(in srgb, var(--bc) 22%, #fffaf0); box-shadow: 0 0 10px color-mix(in srgb, var(--bc) 60%, transparent); }
.ma-node.avail { animation: maGlow 1.6s ease-in-out infinite; }
.ma-node.locked { opacity: .55; filter: grayscale(.6); border-style: dashed; }
.ma-node:active { transform: scale(.94); }
@keyframes maGlow { 50% { box-shadow: 0 0 14px var(--ink-glow); } }
.ma-link { width: 6px; height: 14px; border-radius: 3px; background: #e2d4bd; }
.ma-link.on { background: var(--bc); }
.ma-node-modal { text-align: center; }
.ma-node-modal h3 { font-size: 22px; color: var(--teal); }
.ma-big-ic { font-size: 48px; line-height: 1.1; }
.ma-sub { font-size: 14px; color: var(--text2); font-weight: 800; }
.ma-reason { color: var(--bad); font-weight: 900; font-size: 15px; }
.ma-modal-row, .ma-center { display: flex; justify-content: center; padding: 8px 0 4px; }

/* cosmetics */
.ma-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ma-ccard { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 20px; border: 3px solid #f0dcc0; background: #fffaf0; text-align: center; }
.ma-ccard.on { border-color: var(--teal); background: #eafaf5; box-shadow: 0 0 12px rgba(84,224,207,.5); }
.ma-cimg { width: 96px; height: 96px; object-fit: contain; }
.ma-none { display: grid; place-items: center; font-size: 44px; opacity: .6; }
.ma-ccard.locked .ma-cimg { filter: grayscale(.8) brightness(.9); opacity: .7; }
.ma-cname { font-size: 15px; line-height: 1.2; }
.ma-req { font-size: 13px; font-weight: 800; color: var(--text2); line-height: 1.25; }
.ma-state { display: inline-flex; align-items: center; min-height: 28px; font-size: 14px; font-weight: 900; color: var(--teal); }

/* lists */
.ma-list { display: flex; flex-direction: column; gap: 8px; }
.ma-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 18px; border: 3px solid #f0dcc0; background: #fffaf0; text-align: left; font: inherit; }
button.ma-row { cursor: pointer; }
.ma-row.on { border-color: var(--teal); background: #eafaf5; }
.ma-row.locked { opacity: .65; }
.ma-row-ic { font-size: 30px; flex: none; width: 40px; text-align: center; }
.ma-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ma-row-main b { font-size: 16px; }
.ma-row-main small { font-size: 14px; color: var(--text2); line-height: 1.3; }
.ma-bar { position: relative; height: 16px; border-radius: 8px; background: #eadfcd; overflow: hidden; margin-top: 4px; }
.ma-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint2), var(--ink-glow)); }
.ma-bar em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; color: var(--text); }
.ma-ach-sum { text-align: center; font-size: 18px; font-weight: 900; color: var(--teal); padding-bottom: 6px; }
.ma-ach.on .ma-row-ic { filter: drop-shadow(0 0 6px var(--gold)); }
.ma-bag { align-items: flex-start; }
.ma-bag-img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.ma-owned { font-size: 14px; font-weight: 900; color: var(--apricot2); }
.ma-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.ma-empty, .ma-loading { text-align: center; font-size: 15px; font-weight: 800; color: var(--text2); padding: 24px 12px; line-height: 1.5; }

/* review */
.ma-mascot { display: flex; align-items: flex-end; gap: 8px; }
.ma-bubble { flex: 1; position: relative; padding: 10px 14px; border-radius: 20px; background: #fffaf0; border: 3px solid #f0dcc0; }
.ma-bubble::before { content: ""; position: absolute; left: -9px; bottom: 18px; width: 14px; height: 14px; background: #fffaf0; border-left: 3px solid #f0dcc0; border-bottom: 3px solid #f0dcc0; transform: rotate(45deg); }
.ma-bubble p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--text2); font-weight: 700; }
.ma-due { display: flex; align-items: baseline; gap: 6px; font-weight: 900; }
.ma-due b { font-size: 34px; color: var(--apricot2); line-height: 1; }
.ma-due span { font-size: 16px; }
.btn.ma-big { min-height: 60px; min-width: 200px; font-size: 22px; }
.ma-boxes { margin-top: 10px; padding: 10px 10px 8px; border-radius: 20px; background: #fffaf0; border: 3px solid #f0dcc0; }
.ma-sec { font-size: 14px; font-weight: 900; color: var(--text2); margin-bottom: 6px; }
.ma-chart { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; align-items: end; }
.ma-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ma-col em { font-style: normal; font-size: 13px; font-weight: 900; }
.ma-col span { font-size: 13px; font-weight: 900; color: var(--text2); }
.ma-colbar { height: 64px; width: 100%; display: flex; align-items: flex-end; }
.ma-colbar i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(var(--ink-glow), var(--mint2)); transition: height .5s cubic-bezier(.3,1.4,.5,1); }
.ma-actrow { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding-bottom: 8px; }
.ma-mrow { display: flex; gap: 8px; align-items: center; padding: 10px 8px 10px 12px; border-radius: 18px; border: 3px solid #f0dcc0; background: #fffaf0; }
.ma-m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ma-m-prompt { font-size: 17px; line-height: 1.25; word-break: break-word; }
.ma-m-main small { font-size: 12px; font-weight: 800; color: var(--text2); margin-right: 6px; }
.ma-m-given { font-size: 15px; } .ma-m-given s { color: var(--bad); font-weight: 800; }
.ma-m-exp { font-size: 15px; } .ma-m-exp span { color: var(--teal); font-weight: 900; }
.ma-m-side { display: flex; flex-direction: column; gap: 4px; flex: none; }
.ma-spk, .ma-star, .ma-x { width: 44px; height: 44px; flex: none; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 2px 0 #e6cfae; font-size: 20px; cursor: pointer; line-height: 1; transition: transform .12s; }
.ma-spk:active, .ma-star:active, .ma-x:active { transform: scale(.88); }
.ma-star { color: #cdbfa8; font-size: 26px; } .ma-star.on { color: var(--gold); }
.ma-wrow { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 18px; border: 3px solid #f0dcc0; background: #fffaf0; }
.ma-wmain { flex: 1; min-width: 0; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 4px 6px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; }
.ma-w-emoji { font-size: 28px; width: 38px; text-align: center; flex: none; }
.ma-w-t { display: flex; flex-direction: column; min-width: 0; }
.ma-w-t b { font-size: 18px; } .ma-w-t small { font-size: 13px; color: var(--text2); font-weight: 700; }
.ma-w-m { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-dict-top { position: sticky; top: 58px; z-index: 3; padding-bottom: 8px; background: linear-gradient(#fdf1dc 85%, rgba(253,241,220,0)); }
.ma-input { width: 100%; height: 48px; padding: 0 16px; margin-bottom: 8px; border-radius: 24px; border: 3px solid #f0dcc0; background: #fffdf8; font: 700 16px var(--font); color: var(--text); outline: none; user-select: text; -webkit-user-select: text; box-shadow: inset 0 2px 4px rgba(90,60,30,.08); }
.ma-input:focus { border-color: var(--teal); box-shadow: 0 0 10px rgba(84,224,207,.5); }
.ma-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.ma-chips::-webkit-scrollbar { display: none; }
.ma-chip { flex: none; height: 44px; padding: 0 14px; font-size: 14px; }
.ma-chip.on { background: var(--mint); border-color: var(--teal); color: var(--teal); }

/* word detail */
.ma-detail { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ma-d-emoji { font-size: 48px; line-height: 1.1; }
.ma-d-text { font-size: 38px; font-weight: 900; color: var(--teal); line-height: 1.2; word-break: break-word; }
.ma-d-sub { font-size: 15px; font-weight: 700; color: var(--text2); }
.ma-d-btns { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.ma-fav-btn.on { border-color: var(--gold); } .ma-fav-ic { color: var(--gold); font-size: 22px; width: auto; }
.ma-d-mean { font-size: 20px; font-weight: 900; }
.ma-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ma-tag { font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 10px; background: var(--mint); color: var(--teal); }
.ma-tag.pos { background: var(--apricot); color: #fff; }
.ma-d-ex, .ma-d-ctx { width: 100%; text-align: left; padding: 8px 10px; border-radius: 14px; background: rgba(191,232,220,.35); font-size: 15px; }
.ma-d-ex small, .ma-d-ctx small { display: block; font-size: 12px; font-weight: 900; color: var(--teal); }
.ma-d-ex-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ma-d-ex-row > div { min-width: 0; }
.ma-d-exm { font-size: 14px; color: var(--text2); }
.ma-d-box { font-size: 14px; font-weight: 800; color: var(--text2); }
