* { box-sizing: border-box; }
body { font-family: "Comic Sans MS", "Trebuchet MS", "Microsoft JhengHei", "PingFang TC", sans-serif; background: #fff8e7; margin: 0; color: #333; font-size: 20px; }
header { background: #ff9f43; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
header a.logo { color: white; text-decoration: none; font-size: 24px; font-weight: bold; }
.tools { display: flex; gap: 8px; align-items: center; color: white; font-weight: bold; }
.parentlink { text-decoration: none; font-size: 24px; }
main { max-width: 820px; margin: 0 auto; padding: 16px; }
a { color: #2e86de; }
h1 { font-size: 30px; } h2 { font-size: 24px; margin-top: 28px; }
button, .btn { background: #54a0ff; color: white; border: none; border-radius: 12px; padding: 12px 20px; font-size: 20px; margin: 5px; cursor: pointer; text-decoration: none; display: inline-block; font-family: inherit; }
button:hover, .btn:hover { background: #2e86de; }
button:disabled { opacity: .4; cursor: default; }
button.mini { padding: 3px 10px; font-size: 16px; margin: 0 3px; border-radius: 8px; }
.green { background: #10ac84; } .orange { background: #ff9f43; } .pink { background: #ee5a9b; } .gray { background: #8395a7; }

/* Chinese show/hide */
.zh { display: none; background: #eef6ff; border-left: 4px solid #54a0ff; padding: 6px 10px; margin-top: 6px; font-size: 18px; color: #345; line-height: 1.5; }
body.showzh .zh, .open > .zh { display: block; }
body.showzh span.zh { display: inline-block; margin: 0 0 0 8px; }
.zhfix { font-size: 22px; line-height: 1.5; }

.book { display: block; background: white; padding: 18px; margin: 12px 0; border-radius: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.15); text-decoration: none; color: #333; font-size: 24px; }
.sentence { padding: 8px 12px; margin: 8px 0; border-radius: 10px; background: white; }
.sentence .txt { cursor: pointer; }
.sentence.active { background: #feca57; }

.card { background: white; border-radius: 20px; min-height: 240px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,.2); cursor: pointer; }
.card .word { font-size: 56px; font-weight: bold; color: #ee5a9b; }
.card .meaning { font-size: 26px; }
.card .ex { margin-top: 12px; color: #777; font-style: italic; }
.center { text-align: center; }
input, textarea { font-size: 26px; padding: 10px; border-radius: 10px; border: 3px solid #ccc; width: 100%; font-family: inherit; }
.ok { color: #10ac84; font-size: 26px; } .bad { color: #ee5253; font-size: 24px; }
audio { width: 100%; margin: 10px 0; }
.saved { background: #e8f8f0; padding: 10px 14px; border-radius: 10px; margin: 8px 0; }
.big { font-size: 28px; line-height: 1.5; }
.note { color: #888; }

/* tabs and lists */
.tabs { display: flex; flex-wrap: wrap; }
.tab { background: #c8d6e5; color: #333; } .tab.on { background: #ff9f43; color: white; }
details.wcard { background: white; border-radius: 14px; padding: 10px 16px; margin: 10px 0; box-shadow: 0 2px 5px rgba(0,0,0,.12); }
details summary { cursor: pointer; font-size: 22px; }
.w { font-size: 28px; font-weight: bold; color: #ee5a9b; }
.pos { color: #888; font-size: 16px; margin-left: 6px; }
table.forms { border-collapse: collapse; margin: 8px 0; }
table.forms td { padding: 4px 14px 4px 0; border-bottom: 1px dotted #ddd; }
details ol li { margin: 8px 0; }
b { color: #d63031; }
.formula { background: #fff3cd; padding: 8px 12px; border-radius: 10px; font-size: 22px; }

/* practice */
.qbox { background: white; border-radius: 16px; padding: 16px; margin: 12px 0; }
.opt { display: block; width: 100%; text-align: left; background: #54a0ff; margin: 8px 0; }
.opt.right { background: #10ac84; } .opt.wrong { background: #b2bec3; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.match button { margin: 0; font-size: 18px; background: #74b9ff; }
.match button.sel { background: #ff9f43; } .match button.done { visibility: hidden; }
.built { min-height: 70px; background: white; border: 3px dashed #ccc; border-radius: 12px; padding: 8px; margin: 12px 0; }
.tok { background: #a29bfe; padding: 8px 14px; } .tok.bank { background: #fd79a8; }
.chip { background: #55efc4; color: #333; padding: 6px 12px; font-size: 18px; }
.task { background: #fff3cd; border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
.tip { background: #e8f8f0; border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
@media print { header, button, .tools { display: none; } body { background: white; } }
.reader { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: white; padding: 10px; border-radius: 14px; margin: 10px 0; }
.reader select { font-size: 18px; padding: 6px; border-radius: 8px; }
.stepbox { position: sticky; top: 0; z-index: 5; background: #fff3cd; border: 3px solid #feca57; border-radius: 16px; padding: 12px 16px; margin: 10px 0; }
.sentence .txt { line-height: 1.5; }