/* 말모이: thirty first Korean words as an old Korean book (malmoi-ko.html).
   Ochre 능화 cover with five-hole red-thread binding, a 조각보 endpaper, 한지 pages in the
   five colours (오방색), Hangul in 깍두기 squares, on a hanji wall in low sun. Book units: a page is 540 × 740. */
:root {
  --hanji: #f4eee2;
  --hanji-2: #e9e1d0;
  --ink: #26221e;
  --ink-2: #5a524a;
  --ink-3: #91877b;
  --jeok: #b8433a;    /* 적 red */
  --cheong: #2f5d8a;  /* 청 blue */
  --hwang: #d6a93c;   /* 황 yellow */
  --heuk: #2c2a28;    /* 흑 black */
  --baek: #efe9dc;    /* 백 white */
  --jasaek: #6b3a5a;  /* 자색 purple, 막말 (the rude words) */
  --bunhong: #c56f7d; /* 분홍 pink, 설렘 (the sweet ones) */
  --ochre: #c89a42;   /* the cover */
  --wall: #e9dfcb;     /* hanji on the wall */
  --W: 540px;
  --H: 740px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body {
  color: var(--ink); font-family: 'Gowun Batang', serif; overflow: hidden; -webkit-font-smoothing: antialiased;
  /* a hanji-papered wall: warm, softly mottled, lit low from the upper left where the lattice door is */
  background-color: var(--wall);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006' numOctaves='3' seed='6'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .42 0 0 0 0 .3 0 0 0 .35 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence stitchTiles='stitch' type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='2'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .24 0 0 0 .3 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(60% 70% at 18% 22%, rgba(255,244,214,.9), transparent 70%),
    radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(120,95,60,.26) 100%);
  background-size: 100% 100%, 180px 180px, auto, auto;
  background-repeat: no-repeat, repeat, no-repeat, no-repeat;
  background-attachment: fixed;
}

.shadows { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.shadows svg { position: absolute; stroke: #3a2f22; fill: none; }
.shadows .lattice { left: -6vw; top: -10vh; width: min(46vw, 560px); opacity: .1; filter: blur(3.5px); transform: skewX(-14deg) rotate(3deg); transform-origin: 0 0; }
.shadows .pine { inset: 0; width: 100%; height: 100%; opacity: .14; filter: blur(2.6px); transform-origin: 100% 0; }
body.single .shadows .lattice { opacity: .07; }

/* ---------------------------------------------------------------- the book */
.frame { position: fixed; left: 50%; top: 50%; width: calc(var(--W) * 2); height: var(--H); z-index: 10; }
.frame.single { width: var(--W); clip-path: inset(-40px 0 -220px 0); touch-action: none; }
.book { position: absolute; left: 0; top: 0; width: calc(var(--W) * 2); height: var(--H); perspective: 3800px; }
.block { position: absolute; top: 0; height: 100%; width: var(--W); border-radius: 2px; background: var(--hanji-2); }
.block.l { left: 0; } .block.r { left: var(--W); }
.page, .face { position: absolute; top: 0; width: var(--W); height: var(--H); overflow: hidden; background: var(--hanji); }
.slot-l { left: 0; } .slot-r { left: var(--W); }
.page::before, .face::before { /* 한지: long mulberry fibres and a soft grain */
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.015 .12' numOctaves='3' seed='12' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .48 0 0 0 0 .36 0 0 0 .45 -.27'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .26 0 0 0 0 .2 0 0 0 .4 -.16'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.pg-l::after, .pg-r::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.pg-l::after { background: linear-gradient(270deg, rgba(70,55,30,.14), transparent 7%); }
.pg-r::after { background: linear-gradient(90deg, rgba(70,55,30,.14), transparent 7%); }
.page > *, .face > * { position: absolute; z-index: 1; }
.gutter { position: absolute; left: calc(var(--W) - 1px); width: 2px; top: 0; height: 100%; pointer-events: none; z-index: 60; background: rgba(60,45,20,.15); }
.frame.closed .gutter, .frame.closed .tabs { display: none; }

.leaf { position: absolute; left: var(--W); top: 0; width: var(--W); height: var(--H); transform-origin: 0% 50%; transform-style: preserve-3d; z-index: 100; }
.leaf .face { left: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.leaf .face.back { transform: rotateY(180deg); }
.leaf .shade { position: absolute; inset: 0; z-index: 30; pointer-events: none; opacity: 0; }
.leaf .front .shade { background: linear-gradient(90deg, rgba(50,35,15,.5), rgba(50,35,15,.12) 40%, transparent); }
.leaf .back .shade { background: linear-gradient(270deg, rgba(50,35,15,.4), rgba(50,35,15,.1) 40%, transparent); }

/* ---------------------------------------------------------------- the cover: ochre paper, 능화 emboss, red thread */
.cover { inset: 0; background: var(--ochre); overflow: hidden; }
.cover > * { position: absolute; }
.cover::before {
  content: ''; position: absolute; inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.03 .2' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .05 0 0 0 .5 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23v)'/%3E%3C/svg%3E"),
    radial-gradient(80% 55% at 60% 25%, rgba(255,240,200,.28), transparent 70%),
    radial-gradient(60% 40% at 30% 85%, rgba(90,50,10,.22), transparent 70%),
    linear-gradient(90deg, rgba(60,35,5,.3), rgba(60,35,5,.06) 9%, transparent 12%);
}
.cover-art { inset: 0; width: 100%; height: 100%; }
.jecheom { top: 56px; right: 58px; width: 96px; height: 330px; background: #f3ecdc; box-shadow: 0 1px 3px rgba(60,35,5,.4); display: grid; place-items: center; }
.jecheom::before { content: ''; position: absolute; inset: 7px; border: 1.5px solid rgba(38,34,30,.75); outline: 1px solid rgba(38,34,30,.45); outline-offset: -5px; }
.jecheom h1 { margin: 0; writing-mode: vertical-rl; font: 400 74px/1 'Nanum Brush Script', cursive; letter-spacing: .06em; color: var(--ink); }
.jecheom h1 small { font: 400 22px 'Song Myung', serif; letter-spacing: 0; margin-top: 18px; color: var(--ink-2); }
.cover-seal { top: 400px; right: 84px; width: 44px; height: 44px; }
.cover-en { right: 58px; bottom: 54px; font: italic 15px 'EB Garamond', serif; color: rgba(60,35,5,.6); letter-spacing: .04em; }

/* ---------------------------------------------------------------- page furniture */
.head { left: 56px; right: 56px; top: 36px; height: 34px; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid rgba(38,34,30,.55); padding-bottom: 6px; font: 400 15px 'Gowun Dodum', sans-serif; color: var(--ink-2); }
.head b { font-weight: 400; color: var(--ink); }
.head .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }
.folio { bottom: 22px; font: 400 15px 'Gowun Dodum', sans-serif; color: var(--ink-3); }
.pg-l .folio { left: 56px; } .pg-r .folio { right: 56px; }
.dojang { display: grid; place-items: center; color: #f6efe1; background: var(--jeok); font: 400 24px 'Song Myung', serif; filter: url(#stamp); border-radius: 50%; }

/* ---------------------------------------------------------------- headword page */
.hw-seal { left: 56px; top: 92px; width: 52px; height: 52px; }
.kkak { left: 56px; right: 56px; top: 186px; display: flex; justify-content: center; align-items: flex-start; gap: 6px; }
.syl { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sq { position: relative; display: grid; place-items: center; border: 1.2px solid rgba(184,67,58,.55); background: rgba(255,255,255,.25); font-family: 'Song Myung', serif; line-height: 1; transition: background .15s, color .15s; }
.sq::before, .sq::after { content: ''; position: absolute; pointer-events: none; }   /* the 깍두기 guide cross */
.sq::before { left: 50%; top: 0; bottom: 0; border-left: 1px dashed rgba(184,67,58,.22); }
.sq::after { top: 50%; left: 0; right: 0; border-top: 1px dashed rgba(184,67,58,.22); }
.syl.on .sq { background: var(--jeok); color: #fff; border-color: var(--jeok); }
.whole .sq { color: var(--jeok); }
.jm { display: flex; gap: 3px; }
.jm { gap: 2px; }
.jm i { font: 400 calc(var(--s, 96px) * .17) 'Gowun Dodum', sans-serif; font-style: normal; color: var(--ink-2); width: calc(var(--s, 96px) * .3 - 2px); height: calc(var(--s, 96px) * .25); display: grid; place-items: center; border-radius: 3px; background: rgba(38,34,30,.05); transition: background .15s, color .15s; }
.jm i.f { background: rgba(47,93,138,.1); }      /* the final consonant (받침) */
.syl.on .jm i { background: var(--cheong); color: #fff; }
.gap { width: 22px; }
.pron { left: 56px; right: 56px; top: 372px; text-align: center; font: 400 34px 'Gowun Batang', serif; letter-spacing: .04em; }
.pron .lb { display: block; font: 400 14px 'Gowun Dodum', sans-serif; color: var(--ink-3); letter-spacing: .3em; margin-bottom: 4px; }
.pron b { font-weight: 400; color: var(--jeok); }
.rr { left: 56px; right: 56px; top: 452px; text-align: center; font: italic 22px 'EB Garamond', serif; color: var(--ink-2); letter-spacing: .04em; }
.hanja { left: 56px; right: 56px; top: 496px; text-align: center; font: 400 22px 'Song Myung', serif; color: var(--ink-2); letter-spacing: .3em; }
.hanja small { font: 400 13px 'Gowun Dodum', sans-serif; color: var(--ink-3); letter-spacing: .2em; margin-right: 10px; vertical-align: 3px; }
.gloss { left: 56px; right: 56px; bottom: 92px; text-align: center; font: 500 34px/1.15 'EB Garamond', serif; }

/* ---------------------------------------------------------------- notes page */
.notes { top: 92px; left: 64px; right: 60px; bottom: 70px; display: flex; flex-direction: column; gap: 18px; }
.notes > * { position: relative; }
.n-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid rgba(38,34,30,.3); padding-bottom: 8px; }
.n-head .w { font: 400 28px 'Song Myung', serif; }
.n-head .no { font: italic 14px 'EB Garamond', serif; color: var(--ink-3); }
.lbl { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: italic 14px 'EB Garamond', serif; color: var(--ink-3); font-weight: 400; }
.lbl b { font: 400 13px 'Gowun Dodum', sans-serif; font-style: normal; color: #fff; background: var(--jeok); padding: 2px 6px; border-radius: 2px; letter-spacing: .1em; }
.mean { margin: 0; font: 500 27px/1.2 'EB Garamond', serif; }
.pr-line { margin: 0; font: 400 22px 'Gowun Batang', serif; }
.pr-line b { font-weight: 400; color: var(--jeok); }
.pr-line i { font: italic 18px 'EB Garamond', serif; color: var(--ink-2); margin-left: 10px; }
.pr-note { margin: 6px 0 0; font: 400 15.5px/1.45 'Gowun Dodum', sans-serif; color: var(--cheong); }
.ex-ko { margin: 0; font: 400 21px/1.5 'Gowun Batang', serif; transition: color .2s; }
.ex-ko.on { color: var(--jeok); }
.ex-rr { margin: 2px 0 0; font: italic 15px 'EB Garamond', serif; color: var(--ink-3); }
.ex-en { margin: 0; font: 400 16px 'EB Garamond', serif; color: var(--ink-2); }
.act { appearance: none; background: none; border: 0; padding: 4px 2px; cursor: pointer; color: var(--ink); font: 400 17px 'Gowun Dodum', sans-serif; letter-spacing: .06em; display: inline-flex; align-items: baseline; gap: 8px; border-bottom: 1.5px solid rgba(38,34,30,.5); }
.act i { font: italic 14px 'EB Garamond', serif; letter-spacing: .02em; color: var(--ink-3); }
.act:hover { color: var(--jeok); border-color: var(--jeok); }
.act .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; align-self: center; }
.act.rec { color: var(--jeok); border-color: var(--jeok); }
.act.rec .dot { animation: breathe 1s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.7); opacity: .4; } }
.ex-act { position: absolute; right: 0; top: -2px; font-size: 15px; }
.practice .row { display: flex; gap: 26px; align-items: center; }
.heard { min-height: 28px; margin-top: 10px; font: 400 22px 'Nanum Pen Script', cursive; color: var(--ink-2); }
.heard .ok { color: var(--jeok); }
/* the 참 잘했어요 stamp from a Korean school notebook */
.chaljal { position: absolute; right: 0; bottom: -8px; width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--jeok); color: var(--jeok); display: grid; place-items: center; text-align: center; filter: url(#stamp); opacity: 0; transform: rotate(-12deg); box-shadow: inset 0 0 0 3px var(--hanji), inset 0 0 0 4.5px var(--jeok); }
.chaljal.shown { opacity: .9; }
.chaljal b { display: block; font: 400 30px/1 'Song Myung', serif; }
.chaljal span { display: block; font: 400 16px/1.1 'Gowun Dodum', sans-serif; letter-spacing: .02em; }
.chaljal em { display: block; font-style: normal; font-size: 13px; line-height: 1; margin-top: 2px; }
.ripple { position: absolute; border: 1.5px solid rgba(184,67,58,.5); border-radius: 50%; pointer-events: none; }

/* ---------------------------------------------------------------- title, contents, jamo chart, colophon, endpapers */
.endp { inset: 0; }
.endp svg { width: 100%; height: 100%; display: block; }
.tp-title { left: 0; right: 0; top: 170px; margin: 0; text-align: center; font: 400 110px/1 'Song Myung', serif; letter-spacing: .12em; padding-left: .12em; }
.tp-sub { left: 0; right: 0; top: 300px; margin: 0; text-align: center; font: 400 20px 'Gowun Batang', serif; letter-spacing: .3em; color: var(--ink-2); }
.tp-rule { left: 200px; right: 200px; top: 352px; border-top: 1px solid var(--ink); }
.tp-dots { left: 0; right: 0; top: 368px; display: flex; justify-content: center; gap: 10px; }
.tp-dots i { width: 12px; height: 12px; border-radius: 50%; }
.tp-how { left: 60px; right: 60px; bottom: 90px; margin: 0; text-align: center; font: 400 14px/1.8 'Gowun Dodum', sans-serif; color: var(--ink-3); }
.tp-how b { color: var(--jeok); font-weight: 400; }
.sec-title { left: 56px; right: 56px; top: 90px; margin: 0; text-align: center; font: 400 40px 'Song Myung', serif; letter-spacing: .3em; padding-left: .3em; }
.sec-sub { left: 56px; right: 56px; top: 146px; margin: 0; text-align: center; font: italic 17px 'EB Garamond', serif; color: var(--ink-2); }
.toc { left: 60px; right: 60px; top: 180px; bottom: 74px; columns: 2; column-gap: 36px; column-fill: auto; }
.toc .sec { break-inside: avoid; margin-bottom: 11px; }
.toc .sh { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; font: 400 17px 'Song Myung', serif; }
.toc .sh i { width: 12px; height: 12px; border-radius: 2px; }
.toc .sh em { font: italic 14px 'EB Garamond', serif; color: var(--ink-3); }
.toc .ent { display: flex; align-items: baseline; gap: 6px; padding: 1px 4px; margin: 0 -4px; border-radius: 2px; cursor: pointer; font: 400 15.5px/1.35 'Gowun Batang', serif; }
.toc .ent:hover { background: rgba(184,67,58,.07); color: var(--jeok); }
.toc .ent .d { flex: 1; border-bottom: 1.5px dotted rgba(38,34,30,.3); align-self: center; }
.toc .ent .p { font: 400 14px 'Gowun Dodum', sans-serif; }
.toc .ent .ok { color: var(--jeok); font: 400 13px 'Gowun Dodum', sans-serif; }
.toc-foot { left: 0; right: 0; bottom: 48px; text-align: center; font: 400 14px 'Gowun Dodum', sans-serif; color: var(--ink-3); }
.toc-foot b { color: var(--jeok); font-weight: 400; }
.jamo-tbl { left: 56px; right: 56px; top: 190px; }
.jamo-tbl h3 { margin: 14px 0 8px; font: 400 17px 'Song Myung', serif; display: flex; align-items: baseline; gap: 10px; }
.jamo-tbl h3 em { font: italic 14px 'EB Garamond', serif; color: var(--ink-3); }
.jamo-tbl .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.jamo-tbl .c { text-align: center; border: 1px solid rgba(38,34,30,.18); border-radius: 3px; padding: 3px 0 2px; background: rgba(255,255,255,.3); }
.jamo-tbl .c b { display: block; font: 400 24px/1.1 'Song Myung', serif; }
.jamo-tbl .c i { display: block; font: italic 13px 'EB Garamond', serif; color: var(--ink-2); }
.jamo-tbl .c.t { background: rgba(47,93,138,.08); }
.jamo-demo { left: 56px; right: 56px; bottom: 64px; text-align: center; font: 400 22px 'Gowun Batang', serif; }
.jamo-demo span { color: var(--cheong); }
.jamo-demo b { font: 400 34px 'Song Myung', serif; color: var(--jeok); font-weight: 400; vertical-align: -3px; }
.jamo-demo small { display: block; font: italic 15px 'EB Garamond', serif; color: var(--ink-3); margin-top: 4px; }
.colo { left: 110px; right: 110px; top: 280px; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); padding: 18px 8px; font: 400 16px/2.1 'Gowun Batang', serif; }
.colo b { display: block; text-align: center; font: 400 34px 'Song Myung', serif; letter-spacing: .3em; margin-bottom: 6px; font-weight: 400; }
.colo span { display: flex; justify-content: space-between; border-bottom: .6px dotted rgba(38,34,30,.25); }
.colo span:last-child { border: 0; }
.colo-seal { left: 50%; top: 560px; margin-left: -26px; width: 52px; height: 52px; }

/* ---------------------------------------------------------------- 오방색 thumb tabs on the fore-edge */
.tabs { position: absolute; left: calc(var(--W) * 2); top: 86px; display: flex; flex-direction: column; gap: 12px; z-index: -1; }
.tab { appearance: none; width: 40px; height: 62px; border: 0; border-radius: 0 4px 4px 0; padding: 0 0 0 10px; margin-left: -4px; cursor: pointer; color: #fff; font: 400 16px/1 'Song Myung', serif; writing-mode: vertical-rl; display: grid; place-items: center; box-shadow: inset 6px 0 8px rgba(0,0,0,.16); transition: transform .2s; opacity: .92; }
.tab:hover, .tab.on { transform: translateX(6px); opacity: 1; }
.tab.light { color: var(--ink); }
.frame.single .tabs { display: none; }

/* ---------------------------------------------------------------- the bookmark ribbon (with a 매듭 knot) */
.ribbon { position: absolute; left: 0; top: 0; overflow: visible; z-index: 70; pointer-events: none; filter: drop-shadow(1px 2px 1.5px rgba(60,20,10,.35)); }
.ribbon .band { pointer-events: visibleStroke; cursor: pointer; }
.ribbon .hit { pointer-events: all; cursor: pointer; }

/* ---------------------------------------------------------------- around the book */
.nav { position: fixed; top: 50%; z-index: 20; appearance: none; background: none; border: 1px solid rgba(38,34,30,.25); border-radius: 999px; color: rgba(38,34,30,.75); cursor: pointer; display: flex; align-items: center; gap: 8px; transform: translateY(-50%); transition: color .2s, border-color .2s; padding: 9px 16px; font: 500 16px 'EB Garamond', serif; letter-spacing: .06em; }
.nav:hover { color: var(--ink); border-color: rgba(38,34,30,.6); }
.nav .a { font-size: 22px; line-height: 1; }
.nav.back { left: 18px; } .nav.fwd { right: 18px; }
.nav[disabled] { opacity: .25; cursor: default; }
.markbtn { position: fixed; right: 18px; bottom: 16px; z-index: 20; appearance: none; background: none; border: 1px solid rgba(38,34,30,.25); border-radius: 999px; color: rgba(38,34,30,.75); cursor: pointer; padding: 7px 14px; font: 500 15px 'EB Garamond', serif; display: flex; gap: 6px; align-items: baseline; transition: color .2s, border-color .2s; }
.markbtn b { font: 400 15px 'Gowun Dodum', sans-serif; color: var(--jeok); }
.markbtn:hover { color: var(--ink); border-color: rgba(38,34,30,.6); }
.markbtn.on { border-color: var(--jeok); }
.markbtn[hidden], .tocbtn { display: none; }
.hint { position: fixed; left: 0; right: 0; bottom: 30px; margin: 0; text-align: center; z-index: 20; font: italic 15px 'EB Garamond', serif; color: rgba(38,34,30,.55); letter-spacing: .04em; }
.hint span { font: 400 14px 'Gowun Dodum', sans-serif; font-style: normal; }
.credit { position: fixed; left: 0; right: 0; bottom: 8px; margin: 0; text-align: center; z-index: 20; font: italic 13px 'EB Garamond', serif; color: rgba(38,34,30,.55); letter-spacing: .04em; pointer-events: none; }
.credit a { color: var(--jeok); text-decoration: none; border-bottom: 1px solid rgba(184,67,58,.35); pointer-events: auto; }

/* ---------------------------------------------------------------- one page at a time (phones) */
body.single .credit { bottom: auto; top: calc(10px + env(safe-area-inset-top)); font-size: 12px; }
body.single .hint { bottom: calc(76px + env(safe-area-inset-bottom)); font-size: 14px; }
body.single .nav, body.single .tocbtn:not([hidden]), body.single .markbtn {
  top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); transform: none; height: 44px; padding: 0 16px;
  background: rgba(244,238,226,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
body.single .nav.back { left: 12px; } body.single .nav.fwd { right: 12px; }
body.single .tocbtn:not([hidden]) {
  display: grid; place-items: center; position: fixed; z-index: 20; left: 50%; width: 64px; margin-left: -70px; appearance: none;
  border: 1px solid rgba(38,34,30,.25); border-radius: 999px; color: rgba(38,34,30,.8); font: 400 15px 'Gowun Dodum', sans-serif; letter-spacing: .1em; padding: 0; cursor: pointer;
}
body.single .markbtn { left: 50%; right: auto; margin-left: 6px; width: 54px; justify-content: center; align-items: center; padding: 0; }
body.single .markbtn .t { display: none; }
body.single .markbtn.on { background: var(--jeok); border-color: var(--jeok); }
body.single .markbtn.on b { color: #fff; }
/* a tall phone page: everything below the squares drops by --dy, the notes get bigger type */
.frame.tall .headword .pron, .frame.tall .headword .rr, .frame.tall .headword .hanja, .frame.tall .headword .feel { translate: 0 var(--dy, 0px); }
.frame.tall .headword .kkak { translate: 0 calc(var(--dy, 0px) * .5); }
.frame.single.tall .notes { zoom: 1.2; top: 76px; left: 54px; right: 50px; bottom: 58px; gap: 15px; }

/* ink not settled yet (arrival) */
.pre .syl, .pre .tp-title, .pre .hw-seal, .pre .colo-seal, .pre .toc .ent, .pre .jamo-tbl .c { opacity: 0; }

/* back to the bookshelf (shelf.html), top-left */
.shelf-link { position: fixed; top: 14px; left: 18px; z-index: 30; display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px 6px; border: 1px solid rgba(30,26,22,.22); border-radius: 999px; color: rgba(30,26,22,.7); text-decoration: none; font: 500 15px 'EB Garamond', serif; letter-spacing: .05em; transition: color .2s, border-color .2s; }
.shelf-link .a { font-size: 19px; line-height: 1; }
.shelf-link:hover { color: rgba(30,26,22,1); border-color: rgba(30,26,22,.55); }
body.single .shelf-link { top: calc(6px + env(safe-area-inset-top)); left: 10px; padding: 3px 10px 4px; font-size: 13px; background: rgba(255,255,255,.35); }
body.single .credit { left: 80px; right: 12px; text-align: right; }

/* no mic (window.NO_MIC, a static deploy): no say-it button, no R hint */
.no-mic .act.say, .no-mic .mic-only { display: none; }

/* the rude and sweet words: how it is said, brushed in the section colour (where 漢字 would go) */
.feel { left: 56px; right: 56px; top: 522px; margin: 0; display: flex; justify-content: center; align-items: baseline; gap: 12px; }
.feel b { font: 400 42px/1 'Nanum Brush Script', cursive; font-weight: 400; color: var(--c); }
.feel i { font: italic 18px 'EB Garamond', serif; color: var(--ink-2); letter-spacing: .03em; }
.ex-mood { margin: 0 0 2px; font: italic 13.5px/1.3 'EB Garamond', serif; color: var(--ink-3); }
