/* HARU — visual / UX refresh. The original text, links and scripts are unchanged. */
:root {
  --ink: #292724;
  --mute: #716b65;
  --acc: #98503c;
  --acc-dark: #743727;
  --rule: #e7ded3;
  --line: #e7ded3;
  --bg: #fbf9f5;
  --panel: #f5eee6;
  --panel-line: #e5d8ca;
  --white: #fffefd;
  --soft: #f9f3ed;
  --sans: 'Noto Sans JP','Noto Sans CJK JP','Hiragino Sans','Yu Gothic','Meiryo',sans-serif;
  --serif: 'Noto Serif JP','Noto Serif CJK JP','Hiragino Mincho ProN','Yu Mincho',serif;
  --ko: 'Noto Serif KR','Noto Serif CJK KR','Noto Serif JP','Batang',serif;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(61, 44, 31, .045);
}
html { scroll-behavior: smooth; scroll-padding-top: 106px; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.86; letter-spacing: .015em; }
::selection { background: #ead5c7; color: var(--ink); }
a { color: var(--acc); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--acc-dark); }
a:focus-visible,button:focus-visible,input:focus-visible { outline: 3px solid #a65942; outline-offset: 4px; border-radius: 5px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.h1,.h2,.explore-name,.row .rt,.card .t { font-family: var(--serif); }
.h1 { font-weight: 700; font-size: clamp(30px, 4.7vw, 43px); letter-spacing: -.035em; line-height: 1.52; }
.h2 { font-size: clamp(23px, 3vw, 29px); line-height: 1.48; letter-spacing: -.035em; }
.lead { line-height: 2.04; max-width: 50em; }
.lead.sub { font-size: 15px; line-height: 2.02; color: var(--mute); }
.small { color: var(--mute); font-size: 13px; line-height: 1.9; }
.meta { font-size: 13px; color: var(--mute); }
.label { color: var(--acc); font-size: 11px; line-height: 1.7; letter-spacing: .17em; font-weight: 700; }
.label a { text-decoration: none; }

/* Header: a restrained navigation bar that stays useful on long articles. */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(251,249,245,.96); border-bottom: 1px solid var(--rule); box-shadow: 0 2px 10px rgba(47,39,31,.025); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-head .in { max-width: 1110px; padding: 12px 32px; flex-wrap: nowrap; gap: 16px; }
.brand { display: inline-flex; align-items: baseline; gap: 13px; padding: 6px 0; white-space: nowrap; color: var(--ink); line-height: 1.3; }
.brand:hover { color: var(--acc); }
.brand-word { font-family: Georgia, 'Times New Roman', serif; font-size: 30px; line-height: 1; font-weight: 700; letter-spacing: .035em; }
.brand-caption { margin-left: 0; font-size: 12px; color: var(--mute); letter-spacing: .08em; }
.nav { display: flex; gap: 5px; flex-wrap: nowrap; align-items: center; }
.nav a { padding: 9px 15px; border-radius: 999px; font-size: 13px; font-weight: 500; color: #5a554f; line-height: 1.5; transition: background-color .2s, color .2s; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: #f0e7dc; color: var(--acc-dark); }
.nav a.nav-search { padding-inline: 19px; border: 1px solid var(--panel-line); background: var(--white); }
.nav a.nav-search:hover { background: var(--soft); border-color: #cda995; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 101; padding: 8px 16px; border-radius: 8px; background: #fff; }
.skip-link:focus { top: 12px; left: 12px; }

/* Shared page rhythm. */
.page { max-width: 855px; padding: 52px 30px 100px; gap: 51px; }
.page-standard { max-width: 900px; }
.page-article { max-width: 830px; }
.page-title { position: relative; padding-bottom: 26px; border-bottom: 1px solid var(--rule); }
.page-title::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 65px; height: 3px; background: var(--acc); border-radius: 4px; }
.page-title .h1 { overflow-wrap: anywhere; }
.page > .lead, .page > .stack.rule-top { margin-top: -20px; }
.rule-top { border-top: 0; border-left: 3px solid #d3ac96; background: var(--soft); border-radius: 0 12px 12px 0; padding: 20px 25px; }
.stack.g6 { gap: 7px; }
.stack.g8 { gap: 10px; }
.stack.g12 { gap: 14px; }
.stack.g14 { gap: 18px; }
.stack.g20 { gap: 22px; }
.page section > .label:first-child { margin-bottom: 2px; }
.page section > .h2 { margin-bottom: 2px; }

/* Buttons and compact controls. */
.btn { min-height: 52px; width: fit-content; max-width: 100%; padding: 12px 26px; background: var(--acc); color: #fff; border-radius: 999px; font-size: 14px; font-weight: 700; box-shadow: 0 8px 20px rgba(152,80,60,.14); transition: background-color .2s, box-shadow .2s, transform .2s; }
.btn:hover { background: var(--acc-dark); color: #fff; box-shadow: 0 9px 24px rgba(116,55,39,.2); transform: translateY(-1px); }
.btn.off { background: #b1a69a; color: #fff; box-shadow: none; }
.text-link { display: inline-flex; width: fit-content; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; text-decoration: none; border-bottom: 1px solid #d3ab98; padding-bottom: 3px; }
.text-link:hover { border-color: var(--acc); }
.tb { min-height: 38px; padding: 6px 12px; border: 1px solid var(--panel-line); border-radius: 999px; background: var(--white); text-decoration: none; color: var(--acc); font-size: 12px; font-weight: 600; line-height: 1.45; transition: background .18s, border-color .18s; }
.tb:hover, .tb:focus-visible { background: #f9ede4; border-color: #d4b09f; }
button.tb.off { color: #756f68; background: #f2eee9; }

/* Home: illustrated masthead and clear primary/secondary action. */
.page-home { max-width: 1120px; padding: 0 38px 96px; gap: 0; }
.page-home .top-skyline { margin: 0 -38px -1px; padding: 26px 54px 0; background: linear-gradient(180deg,#f7f0e8 0%,#faf6ef 84%,rgba(250,246,239,0) 100%); }
.page-home .top-skyline img { display: block; width: min(100%,930px); height: auto; margin: 0 auto; }
.home-hero { align-items: center; padding: 35px 20px 70px; border-bottom: 1px solid var(--rule); text-align: center; }
.hero-copy { width: 100%; max-width: 1040px; align-items: center; gap: 20px; }
.hero-label { letter-spacing: .23em; }
#home-title { max-width: 100%; font-size: clamp(31px, 4.1vw, 46px); font-weight: 700; line-height: 1.5; letter-spacing: -.045em; }
#home-title .hero-line { display: inline-block; }
#home-title .hero-line + .hero-line { margin-left: .19em; }
.home-hero .lead { margin: 0 auto; font-size: clamp(14px,1.5vw,17px); color: var(--mute); line-height: 1.95; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 28px; margin-top: 9px; }
.hero-primary { padding-inline: 30px; }
.home-search, .home-explore, .home-book, .home-about { margin-top: 66px; }
.home-search { display: grid; grid-template-columns: minmax(210px, .72fr) minmax(0, 1.28fr); align-items: start; gap: 26px 40px; padding: 42px 44px 45px; border: 1px solid var(--rule); border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.home-search .section-intro { padding-top: 7px; }
.home-search .section-intro .h2 { margin-top: 11px; }
.home-search .sbox { min-width: 0; }
.home-explore { gap: 24px; }
.home-section-heading .h2 { margin-top: 7px; }
.explore-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.explore-card { position: relative; gap: 8px; min-height: 0; padding: 25px 29px 22px; border-radius: 18px; border: 1px solid var(--rule); background: var(--white); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s, transform .2s; }
.explore-card:hover { color: var(--ink); border-color: #caa99a; box-shadow: 0 14px 30px rgba(70,47,32,.08); transform: translateY(-3px); }
.explore-top { font-family: var(--sans); font-size: 12px; letter-spacing: .13em; font-weight: 700; }
.explore-top { position: absolute; top: 20px; right: 22px; }
.explore-top > span:last-child { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); font-size: 14px; }
.explore-name { margin-top: 0; padding-right: 44px; font-size: clamp(22px,2.6vw,28px); letter-spacing: -.035em; line-height: 1.5; }
.explore-meta { line-height: 1.85; font-size: 13px; color: var(--mute); }
.explore-foot { margin-top: 0; padding-top: 10px; font-size: 13px; font-weight: 700; color: var(--acc); }
.home-book { position: relative; display: grid; grid-template-columns: 100px minmax(0,1fr) auto; align-items: center; gap: 28px; min-height: 205px; padding: 28px 36px; border-radius: 19px; overflow: hidden; background: #f1e9dd; border: 1px solid #e6d6c5; }
.home-book-body { min-width: 0; }
.home-book-body .h2 { margin-top: 7px; font-size: clamp(20px,2.8vw,26px); }
.home-book .text-link { white-space: nowrap; }
.book-symbol { position: relative; width: 86px; height: 100px; display: block; flex: 0 0 auto; }
.book-symbol::before { content: ''; position: absolute; bottom: 10px; left: 9px; width: 61px; height: 9px; border-radius: 50%; background: #cab4a0; opacity: .5; filter: blur(6px); }
.book-symbol span { position: absolute; bottom: 9px; height: 82px; width: 23px; border-radius: 4px 6px 5px 4px; box-shadow: inset 4px 0 0 rgba(255,255,255,.17), 4px 5px 8px rgba(65,43,29,.08); }
.book-symbol span:nth-child(1) { left: 8px; background: #7e8473; transform: rotate(-12deg); }
.book-symbol span:nth-child(2) { left: 30px; background: #b7896b; transform: rotate(1deg); }
.book-symbol span:nth-child(3) { left: 53px; background: #865342; transform: rotate(12deg); }
.home-about { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 28px; padding: 24px 4px 2px; border-top: 1px solid var(--rule); }
.home-about .lead { margin-top: 7px; }
.about-stamp { display: flex; flex-direction: column; flex: 0 0 auto; gap: 0; align-items: center; justify-content: center; width: 125px; height: 78px; border: 1px solid var(--rule); border-radius: 50%; font-family: Georgia,serif; font-size: 21px; letter-spacing: .09em; transform: rotate(-6deg); color: #a59a8e; }
.about-stamp small { font-family: var(--sans); font-size: 8px; letter-spacing: .06em; }

/* Find a word: fast focus, tidy suggestions, readable result tiles. */
.sbox { gap: 12px; }
.sbox label { font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.search-field { position: relative; }
.search-field::before { content: ''; display: block; position: absolute; left: 18px; top: 50%; width: 15px; height: 15px; transform: translateY(-60%); border: 2px solid #9a8576; border-radius: 50%; pointer-events: none; }
.search-field::after { content: ''; display: block; position: absolute; left: 33px; top: calc(50% + 5px); width: 8px; height: 2px; transform: rotate(47deg); transform-origin: left center; background: #9a8576; border-radius: 2px; pointer-events: none; }
.sbox input { min-height: 57px; padding: 12px 17px 12px 49px; border: 1px solid #c5b6a7; border-radius: 11px; background: #fff; font-size: 15px; line-height: 1.5; outline-offset: 2px; transition: border-color .2s, box-shadow .2s; }
.sbox input:focus { outline: 0; border: 2px solid var(--acc); padding-left: 48px; box-shadow: 0 0 0 4px rgba(152,80,60,.1); }
.sbox input::placeholder { color: #746a60; opacity: 1; }
.sbox .chips { gap: 7px; line-height: 1.75; }
.sbox .chips > span { margin-right: 2px; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 35px; padding: 5px 13px; background: #f9f4ed; border: 1px solid #e4d7c9; border-radius: 999px; font-family: var(--sans); font-size: 12px; line-height: 1.45; color: #554b43; text-decoration: none; transition: color .2s, background .2s, border-color .2s; }
.chip:hover { background: #f0e2d5; border-color: #c7a28d; color: var(--acc-dark); }
.sbox .results { gap: 9px; margin-top: 4px; }
.results .count { padding: 4px 0; }
.results .none { padding: 17px; background: var(--soft); border-radius: 10px; }
.hit { gap: 5px; padding: 15px 17px; background: var(--white); border: 1px solid var(--rule); border-radius: 12px; text-decoration: none; transition: border-color .2s, background .2s; }
.hit:last-child { border-bottom: 1px solid var(--rule); }
.hit:hover { background: #fff9f2; border-color: #d1b4a1; }
.hit .tp { letter-spacing: .07em; font-size: 11px; }
.hit .ht { font-family: var(--serif); font-size: 16px; font-weight: 700; }
.hit .sn { font-size: 13px; }
.hit mark { background: #f1dfc6; border-radius: 2px; }
.page-search .sbox { padding: 27px; background: var(--white); border: 1px solid var(--rule); border-radius: 18px; box-shadow: var(--shadow); }

/* All navigable lists become discrete, easy-to-tap cards. */
.rows { border: none; display: flex; flex-direction: column; gap: 10px; }
.row { grid-template-columns: 44px minmax(0,1fr); gap: 20px; align-items: start; padding: 20px 23px; border: 1px solid var(--rule); border-radius: 13px; background: var(--white); box-shadow: 0 2px 8px rgba(50,35,24,.018); transition: background .18s, border-color .18s, box-shadow .18s, transform .18s; }
.row:hover { background: #fffaf4; border-color: #d0ac99; box-shadow: 0 7px 20px rgba(56,39,29,.06); transform: translateY(-1px); }
.row .rn { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border-radius: 11px; background: #f6eae0; color: var(--acc); font-size: 12px; font-weight: 700; }
.row .rt { display: inline-block; font-size: 18px; line-height: 1.67; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.row .rm { display: inline-block; padding-top: 4px; font-size: 12px; line-height: 1.85; color: var(--mute); overflow-wrap: anywhere; }
.page-grammar-index .rows { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.page-grammar-index .row { height: 100%; padding: 20px 17px; grid-template-columns: 34px minmax(0,1fr); gap: 13px; }
.page-grammar-index .row .rn { width: 34px; height: 34px; border-radius: 9px; }
.page-grammar-index .row .rt { font-size: 17px; }
.page-work .rows { gap: 9px; }
.card { padding: 24px 28px; border-radius: 14px; background: var(--white); border: 1px solid var(--rule); box-shadow: var(--shadow); transition: border-color .2s, transform .2s; }
.card:hover { border-color: #caa68d; transform: translateY(-1px); }
.card .t { font-size: 20px; }
.card .m { display: inline-block; margin-top: 5px; }

/* Quotes, toggles and previous/next navigation in scene reading. */
.pager-top { padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.pager-top .tb { background: transparent; border-color: transparent; }
.pager-top .tb:hover { background: #f3e8db; border-color: #e9d8c6; }
.page-scene .page-title .h1 { font-size: clamp(24px,3.1vw,32px); line-height: 1.6; }
.page-scene .page-title .meta { margin-top: 4px; }
.quote-box { gap: 23px; margin: 0; padding: 29px 34px 30px; border: 1px solid #e5d9cd; border-left: 4px solid var(--acc); border-radius: 0 17px 17px 0; background: var(--white); box-shadow: var(--shadow); }
.quote-box figcaption { font-size: 12px; letter-spacing: .075em; color: var(--mute); }
.quote-box blockquote { gap: 0; }
.quote-box .ln { padding: 15px 0 16px; border-bottom: 1px solid #eee6dd; gap: 4px; }
.quote-box .ln:first-child { padding-top: 2px; }
.quote-box .ln:last-child { border-bottom: 0; padding-bottom: 0; }
.page-scene .quote-box .ln .ko { font-size: clamp(20px,2.4vw,25px); line-height: 1.55; font-weight: 500; overflow-wrap: anywhere; }
.page-scene .quote-box .ln .ruby { font-size: 13px; line-height: 1.8; color: #a35c42; }
.page-scene .quote-box .ln .trans { font-size: 16px; line-height: 1.85; color: #605950; }
.page-scene .quote-box .ln .spk { font-size: 11px; display: inline-block; width: fit-content; padding: 2px 8px; border-radius: 5px; background: #f5ede3; color: var(--acc); letter-spacing: .03em; }
.toggles { gap: 8px; justify-content: flex-start; }
.toggles .tb { padding-inline: 11px; }
mark.g { background: linear-gradient(transparent 66%,rgba(181,118,75,.21) 66%); }
.notes { gap: 14px; }
dl.note { gap: 8px; padding: 19px 21px; border-radius: 12px; background: var(--white); border: 1px solid var(--rule); }
dl.note dt { font-size: 19px; line-height: 1.6; overflow-wrap: anywhere; }
dl.note dd { font-size: 15px; line-height: 1.85; }
dl.note dd.tag { font-size: 12px; color: var(--acc); }
dl.note dd.more { font-size: 13px; }
.examples { border-bottom: 0; display: flex; flex-direction: column; gap: 9px; }
.examples li { gap: 17px; padding: 16px 19px; border: 1px solid var(--rule); border-radius: 11px; background: var(--white); }
.examples .ko { font-size: 19px; }
.examples .trans { font-size: 14px; }
.examples .no { padding-top: 5px; font-size: 12px; font-weight: 700; }
.src { padding: 19px 23px; border-radius: 12px; background: #f4f1ec; color: #716a61; font-size: 12px; }
.pager-bottom { flex-wrap: nowrap; gap: 15px; border: 0; }
.pager-cell { flex: 1 1 0; gap: 6px; min-height: 95px; padding: 21px 23px; background: var(--white); border: 1px solid var(--rule); border-radius: 13px; font-family: var(--serif); font-size: 16px; line-height: 1.7; transition: background .2s, border-color .2s; }
.pager-cell:hover { background: #fff7f0; border-color: #cfa78e; }
.pager-cell .k { font-size: 11px; letter-spacing: .09em; }

/* Reference grammar: clear hierarchy, examples contained, index chips easy to scan. */
.gindex { gap: 9px; }
.gindex .chip { justify-content: flex-start; font-family: var(--ko); padding: 9px 14px; font-size: 13px; border-radius: 8px; min-height: 38px; text-align: left; }
.gcards { gap: 12px; }
.gblock { position: relative; gap: 8px; padding: 23px 25px 24px; border: 1px solid var(--rule); border-radius: 13px; background: var(--white); scroll-margin-top: 115px; }
.gblock:target { background: #fff8f0; border-color: #c59a7a; box-shadow: inset 4px 0 0 var(--acc); }
.gblock .gn { font-family: var(--ko); font-size: 20px; font-weight: 700; line-height: 1.65; }
.gblock .gd { font-size: 15px; line-height: 1.94; }
.gblock .gd .gloss { display: inline-block; font-size: 13px; color: var(--acc); font-weight: 700; margin: 0 0 5px; }
.gblock .gex { margin: 7px 0 4px; padding: 12px 16px; background: #f8f5f0; border-left: 3px solid #d6baa8; border-radius: 0 8px 8px 0; gap: 3px; }
.gblock .gex .ko { font-size: 17px; }
.gblock .gex .trans { font-size: 13px; }
.gblock .gm { font-size: 12px; line-height: 1.8; }
.gblock .gm a { text-decoration-thickness: 1px; }
.gblock .gn a { text-underline-offset: 4px; }
.gblock .gid { color: #aaa096; font-size: 11px; }
.page-grammar-group .pager-bottom { margin-top: 5px; }
.page-grammar-group > .tb { align-self: flex-start; }
table.forms { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
table.forms th, table.forms td { border-top: 0; border-bottom: 1px solid var(--rule); padding: 12px 14px; }
table.forms tr:first-child > * { border-top: 1px solid var(--rule); }
table.forms th { background: #f5eee6; width: 31%; font-weight: 700; }
.cwords { gap: 8px; border: 0; }
.cw { gap: 8px 20px; padding: 18px; border: 1px solid var(--rule); border-radius: 11px; background: var(--white); }
.cw .w { font-size: 20px; }
.cw .j { font-size: 16px; }

/* Related books as compact editorial panels. */
.book-box { padding: 26px 29px; border: 1px solid var(--rule); border-left: 4px solid #bd8d73; border-radius: 0 14px 14px 0; background: #f7f0e7; gap: 14px; }
.book-box .h2 { font-size: 21px; }
.book-box p.t { font-size: 15px; }
.book-box .btn { margin-top: 4px; }

/* Footer: calm visual ending, keeping the source legal copy verbatim. */
.site-foot { margin-top: auto; background: #34322f; color: #e9e1d8; border-top: 0; }
.site-foot .in { max-width: 1110px; padding: 33px 32px 39px; color: #d4cbc1; font-size: 12px; line-height: 1.95; }
.site-foot .in a { color: #f2e9dc; }
.site-foot .in a:hover { color: #fff; }
.footer-top { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.footer-brand { font-family: Georgia,serif; font-size: 21px; font-weight: 700; text-decoration: none; letter-spacing: .07em; }
.footer-brand span { font-family: var(--sans); font-size: 12px; font-weight: 400; margin-left: 11px; letter-spacing: .02em; }
.footer-back { font-size: 12px; text-decoration: none; white-space: nowrap; }
.footer-notice { max-width: 920px; }
.footer-about { display: inline-block; margin-top: 14px; font-size: 12px; }

@media (max-width: 920px) {
  .page-home { padding-inline: 28px; }
  .page-home .top-skyline { margin-inline: -28px; padding-inline: 30px; }
  .home-search { padding: 34px; grid-template-columns: minmax(190px,.7fr) minmax(0,1.3fr); gap: 26px; }
  .home-book { grid-template-columns: 82px minmax(0,1fr); }
  .home-book .text-link { grid-column: 2; }
  .book-symbol { transform: scale(.9); transform-origin: left center; }
}
@media (max-width: 740px) {
  html { scroll-padding-top: 118px; }
  .site-head .in { padding: 11px 20px 9px; flex-wrap: wrap; gap: 6px; }
  .brand { width: 100%; justify-content: center; padding: 2px 0 3px; gap: 10px; }
  .brand-word { font-size: 27px; }
  .nav { width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
  .nav a, .nav a.nav-search { text-align: center; padding: 8px 5px; font-size: 12px; border-radius: 7px; }
  .page { padding: 33px 22px 74px; gap: 38px; }
  .page-home { padding: 0 22px 74px; gap: 0; }
  .page-home .top-skyline { margin: 0 -22px; padding: 23px 13px 0; }
  .home-hero { padding: 30px 8px 52px; }
  .home-search, .home-explore, .home-book, .home-about { margin-top: 48px; }
  .home-search { grid-template-columns: 1fr; padding: 28px 25px; gap: 20px; }
  .home-search .section-intro .h2 { margin-top: 6px; }
  .explore-card { min-height: 0; padding: 22px 23px 20px; }
  .home-book { gap: 14px 22px; padding: 24px 26px; }
  .page-grammar-index .rows { grid-template-columns: 1fr; }
  .page-grammar-index .row { padding: 17px 19px; grid-template-columns: 40px minmax(0,1fr); }
  .page-grammar-index .row .rn { width: 40px; height: 40px; }
  .notes { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 15px; line-height: 1.86; }
    .page { padding: 29px 18px 65px; gap: 34px; }
  .page-home { padding: 0 18px 66px; }
  .page-home .top-skyline { margin-inline: -18px; padding: 18px 3px 0; }
  .top-skyline img { max-width: 100%; }
  .h1 { font-size: 30px; }
  .h2 { font-size: 23px; }
  .page-title { padding-bottom: 19px; }
  .home-hero { padding: 29px 0 48px; }
  .hero-copy { gap: 16px; }
  #home-title { font-size: clamp(25px, 6.65vw, 34px); line-height: 1.52; letter-spacing: -.055em; }
  #home-title .hero-line + .hero-line { margin-left: 0; }
  .home-hero .lead { font-size: 14px; }
  .hero-actions { flex-direction: column; gap: 16px; margin-top: 5px; }
  .hero-primary { width: min(100%, 284px); }
  .home-search, .home-explore, .home-book, .home-about { margin-top: 43px; }
  .home-search { padding: 25px 19px; border-radius: 15px; }
  .home-search .section-intro { padding: 0; }
  .sbox input { font-size: 14px; }
  .sbox .chips { font-size: 12px; }
  .explore-grid { grid-template-columns: 1fr; gap: 12px; }
  .explore-card { min-height: 0; gap: 6px; padding: 20px 22px 18px; }
  .explore-name { margin-top: 0; font-size: 23px; }
  .explore-foot { padding-top: 6px; }
  .home-book { grid-template-columns: 55px minmax(0,1fr); gap: 8px 15px; padding: 21px 18px; }
  .book-symbol { transform: scale(.64); transform-origin: left center; width: 53px; }
  .home-book-body .h2 { font-size: 18px; }
  .home-book .text-link { grid-column: 2; }
  .home-about { gap: 15px; align-items: start; }
  .home-about .lead { font-size: 13px; }
  .about-stamp { display: none; }
  .rule-top { padding: 16px 17px; }
  .row { grid-template-columns: 36px minmax(0,1fr); gap: 12px; padding: 16px 14px; }
  .row .rn { width: 34px; height: 34px; font-size: 11px; }
  .row .rt, .page-grammar-index .row .rt { font-size: 16px; }
  .row .rm { font-size: 12px; }
  .page-grammar-index .row { grid-template-columns: 34px minmax(0,1fr); padding: 16px 14px; gap: 12px; }
  .page-grammar-index .row .rn { width: 34px; height: 34px; }
  .quote-box { padding: 23px 18px; gap: 18px; }
  .page-scene .page-title .h1 { font-size: 23px; }
  .page-scene .quote-box .ln .ko { font-size: 19px; line-height: 1.55; }
  .page-scene .quote-box .ln .ruby { font-size: 12px; }
  .page-scene .quote-box .ln .trans { font-size: 15px; }
  .quote-box .ln { padding: 13px 0; }
  .toggles { gap: 7px; }
  .toggles .tb { font-size: 11px; padding: 6px 9px; }
  dl.note { padding: 17px; }
  .examples li { padding: 14px; }
  .pager-bottom { gap: 9px; flex-wrap: nowrap; }
  .pager-cell { min-height: 85px; padding: 13px 11px; font-size: 13px; overflow-wrap: anywhere; }
  .pager-cell .k { font-size: 10px; }
  .gblock { padding: 19px 16px; scroll-margin-top: 130px; }
  .gblock .gn { font-size: 18px; }
  .gblock .gd { font-size: 14px; }
  .gblock .gex { padding: 10px 12px; }
  .gindex { gap: 7px; }
  .gindex .chip { font-size: 12px; }
  .page-search .sbox { padding: 19px; }
  .book-box { padding: 23px 19px; }
  .site-foot .in { padding: 28px 18px 33px; }
  .footer-top { align-items: flex-start; }
  .footer-brand span { display: block; margin: 0; }
  .footer-back { padding-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* about：メールアドレス表記が狭い画面で横にはみ出さないようにする */
.page-about .mail-text { overflow-wrap: anywhere; word-break: break-all; }
