/* ===== スマートフォン版 共通スタイル =====================================
   Loaded AFTER include/main.css. Overrides the fixed 650px desktop layout
   so the untouched desktop HTML reads well on a phone.                    */

:root {
  --m-blue: #364c85;
  --m-link: #476cb0;
  --m-line: #d9e0ee;
  --m-soft: #eef2f9;
  --m-text: #222;
  --m-font: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  --m-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
body.m-body {
  margin: 0; padding: 0; background: #fff; color: var(--m-text);
  font-family: var(--m-font); font-size: 17px; line-height: 1.85;
  overflow-x: hidden;
}
html:lang(en) body.m-body { --m-font: Georgia, "Times New Roman", serif; }
html:lang(en) .m-brand { font-size: 18px; letter-spacing: .02em; }

/* ---------- header ---------- */
.m-head {
  position: sticky; top: 0; z-index: 20; height: 60px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px;
  background: #1f2d55 url("/data/menu/hondana_m.jpg") center / cover no-repeat;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 2px 8px rgba(0,0,0,.25);
}
.m-head::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,30,60,.88) 0%, rgba(20,30,60,.6) 50%, rgba(20,30,60,.45) 100%);
}
.m-brand {
  position: relative; color: #fff !important; text-decoration: none !important;
  font-family: var(--m-font); font-size: 21px; font-weight: bold; letter-spacing: .06em;
  text-shadow: 0 1px 3px rgba(0,0,0,.7); white-space: nowrap;
}
.m-burger {
  position: relative; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 0;
}
.m-burger span { display: block; width: 26px; height: 3px; background: #fff; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.6); transition: transform .2s, opacity .2s; }
.m-nav-open .m-burger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.m-nav-open .m-burger span:nth-child(2) { opacity: 0; }
.m-nav-open .m-burger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- drop-down menu ---------- */
.m-nav {
  position: sticky; top: 60px; z-index: 19; background: #fff; border-bottom: 3px solid var(--m-blue);
  box-shadow: 0 8px 24px rgba(0,0,0,.18); max-height: calc(100vh - 60px); overflow-y: auto;
  font-family: var(--m-sans);
}
.m-nav[hidden] { display: none; }
.m-nav ul { list-style: none; margin: 0; padding: 0; }
.m-nav li { border-bottom: 1px solid var(--m-line); }
.m-nav a {
  display: block; padding: 13px 20px; font-size: 17px !important; font-family: inherit !important;
  color: #1c2b52 !important; text-decoration: none !important;
}
.m-nav a:active { background: var(--m-soft); }
.m-nav a.on { color: var(--m-link) !important; font-weight: bold; background: var(--m-soft); box-shadow: inset 4px 0 0 var(--m-link); }
.m-nav-group {
  padding: 12px 20px 6px; font-size: 13px; letter-spacing: .12em; color: #666; background: #f7f9fc;
  border-top: 1px solid var(--m-line); border-bottom: 1px solid var(--m-line);
}
.m-nav .m-nav-lang { background: #f7f9fc; }
.m-nav .m-nav-lang a { font-weight: bold; }

/* ---------- content area ---------- */
.m-main { padding: 12px 16px 32px; max-width: 720px; margin: 0 auto; }

/* kill the fixed desktop widths; CSS beats HTML width= attributes */
.m-main table { width: 100% !important; max-width: 100% !important; height: auto !important; border-collapse: collapse; }
.m-main td, .m-main th { width: auto !important; height: auto !important; }
.m-main img { max-width: 100%; height: auto; }
/* tiny gifs stretched via width/height attributes (gradient rule, spacer): keep their height */
.m-main img[src*="line.gif"] { width: 100%; height: 4px; display: block; }
.m-main img[src*="spacer.gif"] { height: 1px; }
.m-main img[src*="bullet.gif"] { height: auto; }
.m-main video { max-width: 100%; height: auto; display: block; }
.m-main [style*="line-height"] { line-height: 1.85 !important; }
.m-main [style*="float"] { float: none !important; }
.m-main .table_round_top, .m-main .table_round_bottom, .m-main .table_round_left, .m-main .table_round_right { border: 0 !important; }

/* every 650px wrapper row becomes a stack of blocks (text column, cover column, extra columns) */
.m-main table[width="650"]:not(.listing) > tbody > tr > td { display: block; }
.m-main td[width="500"], .m-main td[width="561"], .m-main td[width="320"], .m-main td[width="640"] { display: block; }
/* small images (book covers, buttons) keep their real size; only big ones shrink */
.m-main img.m-thumb { max-width: none; }
.m-main td[width="15"], .m-main td[width="49"], .m-main td[width="10"] { display: none; }
.m-main td[width="135"] { display: block; text-align: center; padding: 8px 0 20px; }
.m-main td[width="135"] img { box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* the "english" switch cell in page titles */
.m-main td[width="72"] { display: none; }

/* typography: the desktop CSS hard-codes "MS Mincho" 15px */
.m-main .texte, .m-main .titre, .m-main .textesmall, .m-main .texteb, .m-main a, .m-main p, .m-main li,
.m-main .style1, .m-main .style7 {
  font-family: var(--m-font) !important;
}
.m-main .texte, .m-main p, .m-main li, .m-main a { font-size: 17px !important; line-height: 1.85 !important; }
.m-main .titre { font-size: 18px !important; line-height: 1.7 !important; }
.m-main .textesmall { font-size: 14px !important; color: #555 !important; }
.m-main .whatnew, .m-main .soustitre {
  display: block; font-size: 19px !important; line-height: 1.4 !important; margin-top: 18px; color: #1c2b52 !important;
}
.m-main a { color: var(--m-link) !important; word-break: break-word; }
.m-main strong a, .m-main a strong { font-weight: bold; }

/* intro box on the home page */
.m-main table[bgcolor="#DFE4EF"] { background: var(--m-soft); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.m-main table[bgcolor="#DFE4EF"] .titre { font-size: 16px !important; font-weight: normal !important; padding: 12px !important; vertical-align: middle; }
.m-main .table_round_left, .m-main .table_round_right { display: none; }
.m-main table[bgcolor="#DFE4EF"] td[width="19"] { display: none; }
.m-main img[src*="corner_"] { display: none; }
.m-main .table_round_top, .m-main .table_round_bottom { display: none; }
.m-main table[bgcolor="#DFE4EF"] td { padding: 12px; vertical-align: middle; }

/* 時評 list on the home page */
.m-main ul.texte { padding-left: 0 !important; margin: 4px 0 8px; list-style: none; }
.m-main ul.texte li { padding: 10px 0; border-bottom: 1px solid var(--m-line); }
.m-main ul.texte li a { display: block; }
.m-main ul.texte li .textesmall { display: block; margin-top: 2px; }

/* timeline table: keep 3 columns, tighten; legacy nowrap cells must wrap */
.m-main td[nowrap], .m-main th[nowrap] { white-space: normal !important; }
.m-main table.listing { table-layout: fixed; }
.m-main table.listing td[width="66"] { width: 3.6em !important; }
.m-main table.listing td[width="40"] { width: 2.1em !important; }
.m-main td[bgcolor="#364C85"] { color: #fff; }
.m-main td[width="66"], .m-main td[width="40"] { white-space: nowrap; padding: 6px 6px !important; }
.m-main td[width="542"] { padding: 6px 4px !important; }

/* generic cells */
.m-main td { padding: 2px 0; vertical-align: top; }
.m-main .listing td { padding: 8px !important; }

.m-more {
  display: block; width: 100%; margin: 4px 0 16px; padding: 14px; font: bold 16px var(--m-sans); color: var(--m-link);
  background: var(--m-soft); border: 1px solid var(--m-line); border-radius: 10px; cursor: pointer;
}
.m-more:active { background: #e2e8f4; }

/* ---------- footer ---------- */
.m-foot {
  margin: 24px 16px 32px; padding-top: 16px; border-top: 1px solid var(--m-line);
  font-family: var(--m-sans); font-size: 14px; color: #666; text-align: center;
}
.m-foot a { color: var(--m-link); text-decoration: none; margin: 0 6px; }
.m-foot p { margin: 12px 0 0; font-size: 12px; }

@media (min-width: 600px) {
  .m-main { padding: 20px 24px 40px; }
  .m-brand { font-size: 24px; }
}
