/* 墨池 mokechi.com — ink-wash look, phone first */
@font-face {
  font-family: "MoBrush";
  src: url("/fonts/mashanzheng-subset.woff2") format("woff2");
  font-display: swap;
}

:root {
  --paper: #F3EEE3;
  --paper-2: #FBF8F2;
  --wash: #E6DFD0;
  --line: #CFC7B6;
  --ink: #1E1C1A;
  --ink-2: #3A3632;
  --muted: #5C574F;
  --seal: #A8321F;
  --seal-dark: #7E2416;
  --ok: #2F5D50;
  --t-plankton: #D9D3C6;
  --t-too_clever: #B7AF9F;
  --t-schooler: #7D766A;
  --t-rare: #4A453E;
  --t-deep_cut: #1E1C1A;
  --t-krillion: #A8321F;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --brush: "MoBrush", "STKaiti", "KaiTi", var(--serif);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--seal); }
a:hover { color: var(--seal-dark); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.app { max-width: 480px; min-height: 100dvh; margin: 0 auto; padding: 16px 24px 28px; display: flex; flex-direction: column; }
.view { display: flex; flex-direction: column; flex: 1; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.seal { width: 34px; height: 34px; border-radius: 4px; background: var(--seal); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--brush); font-size: 22px; line-height: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.link { color: var(--muted); text-decoration: none; padding: 12px 0 12px 12px; font-size: 14px; background: none; border: 0; cursor: pointer; }
.link:hover { color: var(--ink); }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: flex-start; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 0; }

/* buttons */
.btn { display: flex; align-items: center; justify-content: center; min-height: 54px; width: 100%; border-radius: 6px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: 3px;
  text-decoration: none; cursor: pointer; padding: 0 16px; }
.btn:hover { background: #000; color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 400; letter-spacing: 0; min-height: 48px; }
.btn.ghost:hover { background: var(--wash); color: var(--ink); }
.btn:focus-visible, .link:focus-visible, .iconbtn:focus-visible, input:focus-visible { outline: 3px solid var(--seal); outline-offset: 2px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }

/* home */
.hero { position: relative; height: 290px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero svg { position: absolute; top: 40px; }
.hero h1 { position: relative; margin: 0; font-family: var(--brush); font-weight: 400; font-size: 112px; line-height: 1; letter-spacing: 6px; }
.hero p { position: relative; margin: 18px 0 0; font-family: var(--serif); font-size: 16px; color: var(--ink-2); }
.issue { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 2px; }
.issue strong { font-family: var(--serif); font-size: 18px; }
.rules { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rules li { display: flex; gap: 14px; font-size: 15px; }
.rules b { font-family: var(--serif); font-weight: 900; color: var(--seal); width: 18px; flex-shrink: 0; }
.home-actions { margin-top: 24px; }
.foot { text-align: center; margin-top: 16px; }

/* play */
.steps { display: flex; gap: 6px; margin-top: 12px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.done { background: var(--ink); }
.steps span.now { background: var(--seal); }
.clock { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; }
.clock.low { border-color: var(--seal); color: var(--seal); }
.question { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 44px; text-align: center; }
.question .ask { font-family: var(--serif); font-size: 22px; line-height: 1.5; margin: 0; }
.bigseal { width: 140px; height: 140px; border-radius: 8px; background: var(--seal); color: var(--paper);
  display: flex; align-items: center; justify-content: center; font-family: var(--brush); font-size: 112px; line-height: 1; }
.answer-form { margin-top: 28px; }
.answer-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.answer-row { display: flex; gap: 10px; }
.answer-row input { flex: 1; min-width: 0; height: 56px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper-2);
  padding: 0 14px; font-family: var(--serif); font-size: 22px; letter-spacing: 3px; color: var(--ink); }
.answer-row .btn { width: 84px; flex: none; letter-spacing: 2px; }
.msg { min-height: 24px; margin-top: 10px; font-size: 14px; }
.msg.bad { color: var(--seal); }
.shake { animation: shake .35s; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.inkbar { margin-top: 14px; height: 6px; background: #E2DBCB; border-radius: 3px; overflow: hidden; }
.inkbar div { height: 6px; background: var(--ink); width: 100%; transition: width 1s linear; }

/* reveal */
.card-ink { margin-top: 14px; background: var(--ink); color: var(--paper); border-radius: 8px; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.card-ink .label { font-size: 13px; color: var(--line); }
.card-ink .word { font-family: var(--serif); font-weight: 900; font-size: 34px; letter-spacing: 5px; }
.card-ink .pts { font-family: var(--serif); font-weight: 900; font-size: 28px; color: #F2B9AC; }
.stamp { min-width: 64px; height: 64px; padding: 4px; border: 2px solid #E0573F; color: #E0573F; border-radius: 6px; display: inline-flex;
  align-items: center; justify-content: center; text-align: center; font-family: var(--brush); font-size: 20px; line-height: 1.05; transform: rotate(-8deg); }
.card-ink.miss .word { color: var(--line); }
.meaning { margin-top: 14px; font-family: var(--serif); font-size: 15px; line-height: 1.7; }
h2 { font-family: var(--serif); font-size: 16px; font-weight: 600; margin: 22px 0 10px; }
.bars { display: flex; flex-direction: column; gap: 9px; }
.bars .b { display: flex; align-items: center; gap: 10px; }
.bars .w { width: 92px; font-family: var(--serif); font-size: 15px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .track { flex: 1; height: 22px; background: var(--wash); border-radius: 3px; overflow: hidden; }
.bars .fill { height: 22px; }
.bars .t { width: 70px; font-size: 12px; text-align: right; color: var(--ink-2); flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--serif); font-size: 15px; padding: 6px 10px; border-radius: 4px; background: var(--wash); }
.gem { margin-top: 18px; border: 2px solid var(--seal); border-radius: 8px; padding: 14px 16px; }
.gem .word { font-family: var(--serif); font-weight: 900; font-size: 24px; letter-spacing: 3px; }
.video { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; text-decoration: none; color: var(--ink); background: var(--paper-2); margin-top: 16px; }

/* result */
.pond { position: relative; height: 210px; display: flex; align-items: center; justify-content: center; }
.pond svg { position: absolute; }
.pond .score { position: relative; text-align: center; color: var(--paper); }
.pond .score b { display: block; font-family: var(--serif); font-weight: 900; font-size: 64px; line-height: 1; }
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.tile { height: 46px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-family: var(--brush); font-size: 22px; color: #fff; }
.tile.plankton, .tile.too_clever { color: var(--ink); }
.list { margin-top: 16px; border-top: 1px solid var(--line); }
.list .r { display: flex; align-items: center; justify-content: space-between; min-height: 40px; border-bottom: 1px solid #E2DBCB; font-size: 15px; gap: 10px; }
.list .r span:first-child { font-family: var(--serif); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 6px; font-size: 14px; }

/* archive */
.days { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.days a { display: flex; justify-content: space-between; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); padding: 0 4px; }
.days a:hover { background: var(--wash); }

@media (prefers-reduced-motion: reduce) { .shake { animation: none; } .inkbar div { transition: none; } }

/* levels */
.lvchip { display: inline-block; font-size: 12px; line-height: 1; padding: 4px 9px; border-radius: 11px; color: #fff; font-family: var(--sans); font-weight: 500; vertical-align: 2px; }
.lvhead { display: flex; align-items: baseline; gap: 14px; margin-top: 16px; }
.lvhead h1 { margin: 0; font-family: var(--brush); font-weight: 400; font-size: 64px; line-height: 1; }
.lvhead p { margin: 0; font-family: var(--serif); color: var(--ink-2); }
.lvcard { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 10px; background: var(--paper-2); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.lvcard:hover { border-color: var(--ink); }
.lvcard.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lvseal { width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; color: var(--paper); display: flex; align-items: center; justify-content: center; font-family: var(--brush); font-size: 44px; }
.lvtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lvname { font-family: var(--serif); font-size: 21px; font-weight: 900; }
.lvage, .lvrule { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); }
.lvcard.dark .lvage, .lvcard.dark .lvrule { color: var(--line); }
.lvstatus { font-size: 13px; font-weight: 700; color: var(--seal); flex-shrink: 0; }
.lvcard.dark .lvstatus { color: #F2B9AC; }
.note { border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; color: var(--ink-2); }
.askpy { font-size: 15px; color: var(--muted); letter-spacing: 1px; }
.view.kid .ask { font-size: 26px; font-weight: 600; }
.view.kid .bigseal { width: 160px; height: 160px; font-size: 128px; border-radius: 16px; background: #C0613A; }
.view.kid .answer-row input { height: 64px; font-size: 28px; border-radius: 10px; }
.view.kid .answer-row .btn { height: 64px; width: 96px; border-radius: 10px; }
.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; min-height: 0; }
.pick { min-width: 52px; height: 52px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-2); font-family: var(--serif); font-size: 24px; cursor: pointer; }
.pick:hover, .pick:focus-visible { border-color: var(--ink); outline: none; }
.pyw { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.pyw small { font-family: var(--sans); font-size: 12px; letter-spacing: 0; opacity: .8; }
.pyw.big small { font-size: 15px; }
.dayrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 56px; border-bottom: 1px solid var(--line); padding: 8px 4px; }
.dlinks { display: flex; gap: 6px; flex-wrap: wrap; }
.dlv { font-size: 13px; text-decoration: none; color: var(--ink); border: 1px solid; border-radius: 14px; padding: 6px 10px; }
.dlv:hover { background: var(--wash); }
[tabindex="-1"]:focus { outline: none; }
.days a.dlv { display: inline-block; min-height: 0; border-bottom: 1px solid; padding: 6px 10px; }
#app[data-level="teen"] .bigseal { background: #2F5D50; }
#app[data-level="kid"] .bigseal { background: #C0613A; }

/* 墨课动画 videos */
.link.tv { color: var(--seal); font-weight: 500; }
.tvsec { margin-top: 28px; }
.tvhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tvhead h2 { margin: 0 0 4px; font-size: 19px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.tvhead a { text-decoration: none; padding: 8px 0; }
.seal.mini { width: 26px; height: 26px; font-size: 17px; }
.vstrip { display: flex; gap: 12px; overflow-x: auto; margin: 14px -24px 0; padding: 0 24px 6px; scroll-snap-type: x proximity; scroll-padding-inline: 24px; scrollbar-width: none; }
.vstrip::-webkit-scrollbar { display: none; }
.vstrip .vcard { width: 168px; flex-shrink: 0; scroll-snap-align: start; }
.vcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vthumb { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; text-decoration: none; }
.vthumb .vch { font-family: var(--brush); font-size: 46px; color: rgba(243, 238, 227, .9); }
.vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vgrade, .vdur { position: absolute; font-size: 11px; line-height: 1.5; color: var(--paper); padding: 0 6px; border-radius: 3px; }
.vgrade { left: 6px; top: 6px; background: rgba(30, 28, 26, .6); }
.vdur { right: 6px; bottom: 6px; background: rgba(30, 28, 26, .78); }
.vtitle { font-family: var(--serif); font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink); text-decoration: none; }
.vtitle:hover { color: var(--seal); }
.vplay { text-decoration: none; }
.vq { font-size: 12px; line-height: 1.4; color: var(--ink-2); background: var(--wash); border-radius: 4px; padding: 5px 7px; }
.btn.sub { margin-top: 18px; border-radius: 24px; gap: 10px; font-weight: 500; }
.yt { width: 26px; height: 18px; border-radius: 5px; background: var(--seal); position: relative; flex-shrink: 0; }
.yt::after { content: ""; position: absolute; left: 10px; top: 4px; border-left: 8px solid var(--paper); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.vlist { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.vrow { display: flex; gap: 12px; align-items: flex-start; }
.vrow .vthumb { width: 136px; flex-shrink: 0; }
.vrow .vch { font-size: 38px; }
.vrtext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vrtext .vtitle { font-size: 15px; }
.vwhy { color: var(--ok); font-weight: 500; }
.chan { margin-top: 12px; padding: 18px; border-radius: 12px; background: var(--ink); color: var(--paper); display: flex; flex-direction: column; gap: 12px; }
.chan p { margin: 0; color: var(--line); line-height: 1.6; }
.chanrow { display: flex; align-items: center; gap: 14px; }
.chanrow h1 { margin: 0 0 2px; font-family: var(--serif); font-size: 21px; font-weight: 900; }
.chanseal { width: 60px; height: 60px; flex-shrink: 0; border-radius: 50%; background: var(--seal); display: flex; align-items: center; justify-content: center; font-family: var(--brush); font-size: 36px; }
.btn.chansub { background: var(--paper); color: var(--ink); border-color: var(--paper); border-radius: 24px; min-height: 46px; font-family: var(--sans); font-size: 15px; letter-spacing: 0; font-weight: 700; }
.btn.chansub:hover { background: #fff; color: var(--ink); }
.frow { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.flabel { flex-shrink: 0; width: 28px; }
.fchips { display: flex; gap: 8px; overflow-x: auto; margin-right: -24px; padding: 2px 24px 4px 0; scrollbar-width: none; min-width: 0; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex-shrink: 0; min-height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; background: transparent; color: var(--ink-2); border: 1px solid var(--line); cursor: pointer; }
.fchip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fchip:focus-visible, .vtitle:focus-visible, .vplay:focus-visible { outline: 3px solid var(--seal); outline-offset: 2px; }
.vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; margin-top: 12px; }
.vmore { margin-top: 22px; }

/* the videos page on a computer: full width, channel header in one row, more columns */
@media (min-width: 760px) {
  .app.wide { max-width: 1120px; padding: 20px 40px 32px; }
  .app.wide .chan { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 22px 28px; }
  .app.wide .chandesc { max-width: 460px; }
  .app.wide .chansub { width: auto; padding: 0 28px; }
  .app.wide .fchips { flex-wrap: wrap; overflow: visible; margin-right: 0; padding-right: 0; }
  .app.wide .vgrid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 20px; }
  .app.wide .vthumb .vch { font-size: 56px; }
  .app.wide .vmore { max-width: 360px; margin-left: auto; margin-right: auto; }
}

/* how to play */
.how .howtitle { font-family: var(--serif); font-size: 26px; font-weight: 900; margin: 16px 0 8px; }
.how .lead { font-family: var(--serif); font-size: 16px; line-height: 1.7; margin: 0; }
.how h2 { font-size: 17px; font-weight: 900; margin: 26px 0 10px; }
.how .rules { margin-top: 0; }
.how .rules li span { line-height: 1.6; }
.hlist { display: flex; flex-direction: column; gap: 10px; }
.hrow { display: flex; gap: 12px; align-items: center; }
.hrow .tile { width: 44px; height: 44px; flex-shrink: 0; }
.htext { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.htext b { font-family: var(--serif); font-size: 15px; }
.lvseal.sm { width: 44px; height: 44px; font-size: 30px; }
.hbul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.6; }
.how p.small { line-height: 1.7; }

/* 我觉得这个是对的 / 词典新收 */
.link.appeal { display: inline-block; padding: 8px 0; margin-top: 2px; color: var(--seal); text-decoration: underline; font-size: 14px; }
.fresh { margin: 10px 0 0; line-height: 1.6; }

/* owner's stats page */
.stab { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.stab th, .stab td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.stab th { font-weight: 600; font-size: 13px; color: var(--muted); }
.stab td:first-child { white-space: nowrap; }
.stats code { background: var(--wash); padding: 1px 5px; border-radius: 3px; }

/* 继续挖 on the results page */
.list .r .dig { margin-left: 10px; font-size: 12px; color: var(--seal); text-decoration: none; padding: 6px 0; }
.list .r .dig:hover { text-decoration: underline; }
