/* Content pages reuse the homepage header; all additional rules are scoped. */
#page-index-m.page-content-rwd table.MainPanel { width:100%; max-width:995px; }
/* Mobile block layout must grow with wrapped footer text, not legacy height:50. */
#page-index-m.page-content-rwd .MainPanelFooter {
 height:auto;
 min-height:50px;
 box-sizing:border-box;
 overflow-wrap:anywhere;
}
@media (max-width:768px) {
 #page-index-m.page-content-rwd { margin:0; }
 #page-index-m.page-content-rwd .MainPanelCenter { padding:0 8px; overflow-wrap:anywhere; }
 #page-index-m.page-content-rwd .MainPanelCenter table { max-width:100%; box-sizing:border-box; }
 #page-index-m.page-content-rwd .rwd-section-title,
 #page-index-m.page-content-rwd .rwd-layout,
 #page-index-m.page-content-rwd .rwd-stack { display:block; width:100%; height:auto; border-spacing:0; }
 #page-index-m.page-content-rwd :is(.rwd-section-title,.rwd-layout,.rwd-stack) > tbody,
 #page-index-m.page-content-rwd :is(.rwd-section-title,.rwd-layout,.rwd-stack) > tbody > tr,
 #page-index-m.page-content-rwd :is(.rwd-section-title,.rwd-layout,.rwd-stack) > tbody > tr > td {
  display:block; width:100%; height:auto; min-width:0; box-sizing:border-box;
 }

 #page-index-m.page-content-rwd .rwd-section-title td { padding:2px 0; }
 #page-index-m.page-content-rwd .rwd-stack > tbody > tr > td { padding:8px 0; }
 #page-index-m.page-content-rwd input,
 #page-index-m.page-content-rwd select,
 #page-index-m.page-content-rwd textarea { max-width:100%; box-sizing:border-box; }
 #page-index-m.page-content-rwd .MainPanelCenter :is(input,select,button) { min-height:32px; }
 #page-index-m.page-content-rwd div.TabStyle_60 { width:0; min-width:100%; overflow-x:auto; }
 #page-index-m.page-content-rwd ul.TabStyle_60 { display:flex; width:max-content; min-width:100%; padding:0; }
 #page-index-m.page-content-rwd ul.TabStyle_60 li { flex-shrink:0; }
 #page-index-m.page-contact .MainPanelCenter table { width:100%; }
 #page-index-m.page-contact #message :is(input[type=text],textarea,select) { width:100%; font-size:16px; }
 #page-index-m.page-authorlist .rwd-author-results { width:100%; table-layout:fixed; }
 #page-index-m.page-authorlist .rwd-author-results td { width:auto; padding:4px 2px; overflow-wrap:anywhere; }
 #page-index-m.page-authorlist .rwd-author-results col:nth-child(1) { width:8%; }
 #page-index-m.page-authorlist .rwd-author-results col:nth-child(2) { width:15%; }
 #page-index-m.page-authorlist .rwd-author-results col:nth-child(3) { width:47%; }
 #page-index-m.page-authorlist .rwd-author-results col:nth-child(4),
 #page-index-m.page-authorlist .rwd-author-results col:nth-child(5) { width:15%; }
 #page-index-m.page-authorlist .rwd-author-results p { text-align:left; line-height:2; }
 #page-index-m.page-fulltext .MainPanelCenter table { width:100%; }
 #page-index-m.page-fulltext .MainPanelCenter td { overflow-wrap:anywhere; }
 #page-index-m.page-fulltext .MainPanelCenter td[width] { width:auto; }
 #page-index-m.page-fulltext .pagetitle font { color:#555; }
}
@media (max-width:480px) {
 #page-index-m.page-content-rwd .MainPanelFooter { padding:16px 10px; }
}
@media (max-width:768px) {
 #page-index-m.page-about .MainPanelCenter table { width:100%; }
 #page-index-m.page-about .MainPanelCenter td[width] { width:auto; }
}
/* Consultants: preserve portrait sizes while stacking biographies on mobile. */
@media (max-width:768px) {
 #page-index-m.page-consultants .MainPanelCenter table { width:100%; margin-left:0 !important; }
 #page-index-m.page-consultants .pagetitle { line-height:2; }
 #page-index-m.page-consultants .pagetitle a { display:inline-block; }
 #page-index-m.page-consultants .rwd-stack > tbody > tr > td { padding:8px; }
}
/* Hide spacer cells at every breakpoint, including stacked mobile tables. */
#page-index-m.page-content-rwd .rwd-spacer { display:none !important; }

/* Localized content-page header artwork, relative to this root stylesheet. */
#page-index-m.content-jp #page-index-m-header { background-image:url(jp/images/head.gif); }
@media (max-width:768px) {
 #page-index-m.content-jp #page-index-m-header { background-image:url(jp/images/head-rwd.gif); }
 #page-index-m.content-jp td.MainPanelHeaderJP { height:auto; background-image:none; }
}

/* Contribution form: give the external document a definite, scrollable viewport. */
#page-index-m.page-search-reg .contribution-form {
 display:block;
 width:100%;
 max-width:100%;
 height:800px;
 height:80vh;
 height:80dvh;
 min-height:320px;
 border:0;
 box-sizing:border-box;
}

/* Citation text and DOI remain readable independently of the tab strip. */
#page-index-m.page-cite .citation-doi { margin:0 0 12px; line-height:1.6; overflow-wrap:anywhere; }
#page-index-m.page-cite .Tab_R { cursor:pointer; }
#page-index-m.page-cite .Tab_R:focus-visible { outline:2px solid #555; outline-offset:-2px; }
@media (max-width:768px) {
 #page-index-m.page-cite .citation-content { width:100%; table-layout:fixed; }
 #page-index-m.page-cite .citation-content table { width:100%; table-layout:fixed; }
 #page-index-m.page-cite .citation-content textarea { width:100%; min-width:0; min-height:12em; font-size:16px; line-height:1.5; }
 #page-index-m.page-cite .citation-content input[type="button"] { min-height:44px; padding:8px 20px; }
}
/* Author landing page: stack the search row and list columns on small screens. */
#page-index-m.page-author-index .Tab_R:focus-visible { outline:2px solid #555; outline-offset:-2px; }
@media (max-width:768px) {
 #page-index-m.page-author-index .author-index-panel,
 #page-index-m.page-author-index .author-index-panel > tbody,
 #page-index-m.page-author-index .author-index-panel > tbody > tr,
 #page-index-m.page-author-index .author-index-panel > tbody > tr > td {
  display:block; width:100%; height:auto; min-width:0; box-sizing:border-box;
 }
 #page-index-m.page-author-index .author-index-panel { padding:8px; }
 #page-index-m.page-author-index .author-index-query > tbody > tr > td { text-align:left; padding:4px 0; }
 #page-index-m.page-author-index .author-index-query :is(input,select) {
  min-height:44px; font-size:16px; margin:4px 0; box-sizing:border-box;
 }
 #page-index-m.page-author-index .author-index-query :is(input[type="text"],select) { display:block; width:100%; }
 #page-index-m.page-author-index .author-index-query :is(input[type="submit"],input[type="reset"]) { width:calc(50% - 4px); }
 #page-index-m.page-author-index .author-index-lists table { width:100%; table-layout:fixed; }
 #page-index-m.page-author-index .author-index-lists td { overflow-wrap:anywhere; }
 #page-index-m.page-author-index .author-index-lists :is(#Top10latestauthor,#Top10modifyauthor,#Top20individual,#Top20group) td:first-child:not([colspan]) { width:26px; }
 #page-index-m.page-author-index .author-index-lists :is(#Top10latestauthor,#Top10modifyauthor) td:last-child:not([colspan]) { width:90px; }
 #page-index-m.page-author-index .author-index-lists :is(#Top20individual,#Top20group) td:last-child:not([colspan]) { width:64px; }
 #page-index-m.page-author-index .author-index-lists a { line-height:1.8; }
 #page-index-m.page-author-index .author-index-lists [id^="loadtop"] img { margin:24px 0 !important; }
}

/* Author details: desktop bibliography table becomes mobile cards. */
#page-index-m.page-authorinfo .author-work-label { display:none; }
#page-index-m.page-authorinfo :is(.Tab_R,.author-works a):focus-visible {
 outline:2px solid #555; outline-offset:-2px;
}
@media (max-width:768px) {
 #page-index-m.page-authorinfo :is(.author-info-summary,.author-info-fields) {
  width:100%; table-layout:fixed; border-spacing:2px;
 }
 #page-index-m.page-authorinfo .author-info-summary > tbody > tr > td:first-child { width:14px; }
 #page-index-m.page-authorinfo .author-info-summary > tbody > tr > td[colspan] { width:auto; }
 #page-index-m.page-authorinfo .author-info-name { width:100%; table-layout:fixed; }
 #page-index-m.page-authorinfo .author-info-name td:last-child { width:76px; }
 #page-index-m.page-authorinfo .author-info-name a {
  display:inline-flex; align-items:center; justify-content:center; min-width:36px; min-height:44px;
 }
 #page-index-m.page-authorinfo .rwd-stack td,
 #page-index-m.page-authorinfo .rwd-stack p { text-align:left; }
 #page-index-m.page-authorinfo .author-info-fields > tbody > tr > td { width:auto; overflow-wrap:anywhere; }
 #page-index-m.page-authorinfo .author-info-fields > tbody > tr > td:first-child:not([colspan]) { width:14px; }
 #page-index-m.page-authorinfo .author-info-fields > tbody > tr > td:nth-child(2):not([colspan]) { width:48px; }
 #page-index-m.page-authorinfo .author-info-fields > tbody > tr > td:last-child:not([colspan]) { width:28px; }
 #page-index-m.page-authorinfo .author-info-fields > tbody > tr > td:last-child:not([colspan]) a {
  display:inline-flex; align-items:center; justify-content:center; min-height:44px; width:100%;
 }
 #page-index-m.page-authorinfo .author-works-container,
 #page-index-m.page-authorinfo .author-works,
 #page-index-m.page-authorinfo .author-works > tbody {
  display:block; width:100%; min-width:0; max-width:100%; box-sizing:border-box;
 }
 #page-index-m.page-authorinfo .author-works-heading,
 #page-index-m.page-authorinfo .author-works-divider { display:none; }
 #page-index-m.page-authorinfo .author-work-card {
  display:flex; flex-direction:column; gap:8px; margin:10px 0; padding:14px;
  border:1px solid #c5d7a3; border-radius:8px; background:#fff !important;
  box-sizing:border-box;
 }
 #page-index-m.page-authorinfo .author-work-card > td {
  display:flex; align-items:baseline; gap:10px; width:auto; height:auto;
  padding:0; text-align:left; font-size:16px; line-height:1.6;
  min-width:0; overflow-wrap:anywhere;
 }
 #page-index-m.page-authorinfo .author-work-label {
  display:block; flex:0 0 4em; color:#666; font-size:14px;
 }
 #page-index-m.page-authorinfo .author-work-value { display:block; flex:1; min-width:0; }
 #page-index-m.page-authorinfo .author-work-card > .author-work-title {
  order:-1; padding-bottom:8px; border-bottom:1px solid #e4ebda;
  font-size:18px; font-weight:bold;
 }
 #page-index-m.page-authorinfo .author-work-title .author-work-label { display:none; }
 #page-index-m.page-authorinfo .author-work-title a { line-height:1.6; }
 #page-index-m.page-authorinfo .author-work-fulltext a {
  display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px;
 }
}

@media (max-width:768px) {
 #page-index-m.page-authorinfo .author-info-fields > colgroup > col:nth-child(1) { width:14px; }
 #page-index-m.page-authorinfo .author-info-fields > colgroup > col:nth-child(2) { width:48px; }
 #page-index-m.page-authorinfo .author-info-fields > colgroup > col:nth-child(4) { width:28px; }
}

/* Hidden must win over the mobile card's explicit display:flex rule. */
#page-index-m.page-authorinfo :is(.author-work-card,.author-works-divider,.author-works-filters,#author-works-empty)[hidden] { display:none !important; }
#page-index-m.page-authorinfo .author-works-filters {
 display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px;
 margin:12px 0; padding:12px; border:1px solid #c5d7a3; background:#f5f8ef;
 box-sizing:border-box; text-align:left;
}
#page-index-m.page-authorinfo .author-works-filters label { display:flex; flex-direction:column; gap:4px; min-width:0; }
#page-index-m.page-authorinfo .author-works-keyword { flex:1 1 240px; }
#page-index-m.page-authorinfo .author-works-filters :is(input,select,button) {
 box-sizing:border-box; max-width:100%; min-width:0; min-height:44px; padding:6px 8px; font-size:16px;
}
#page-index-m.page-authorinfo .author-works-keyword input { width:100%; }
#page-index-m.page-authorinfo #author-works-count { flex-basis:100%; margin:0; }
#page-index-m.page-authorinfo #author-works-empty { padding:16px; text-align:left; }
#page-index-m.page-authorinfo .author-works-filters :is(input,select,button):focus-visible { outline:2px solid #555; outline-offset:2px; }
@media (max-width:480px) {
 #page-index-m.page-authorinfo .author-works-filters label { flex:1 1 100%; }
 #page-index-m.page-authorinfo .author-works-filters button { width:100%; }
}

/* Independent mobile disclosures; author name and bibliography stay visible. */
#page-index-m.page-authorinfo :is(#author-info-details,#author-basic-info,#author-basic-toggle-row,#author-filters-panel)[hidden],
#page-index-m.page-authorinfo .author-info-toggle[hidden] { display:none !important; }
#page-index-m.page-authorinfo .author-info-toggle { display:none; }
@media (max-width:768px) {
 #page-index-m.page-authorinfo .author-info-toggle {
  display:block; width:100%; min-height:44px; margin:8px 0; padding:10px 12px;
  border:1px solid #c5d7a3; border-radius:6px; background:#f5f8ef;
  color:#333; font-size:16px; text-align:left; cursor:pointer;
 }
 #page-index-m.page-authorinfo .author-info-toggle::after { content:"＋"; float:right; }
 #page-index-m.page-authorinfo .author-info-toggle[aria-expanded="true"]::after { content:"−"; }
 #page-index-m.page-authorinfo .author-info-toggle:focus-visible { outline:2px solid #555; outline-offset:2px; }
}

/* Leave room for localized metadata and card labels. */
@media (max-width:768px) {
 #page-index-m.page-authorinfo.content-en .author-info-fields > colgroup > col:nth-child(2),
 #page-index-m.page-authorinfo.content-en .author-info-fields > tbody > tr > td:nth-child(2):not([colspan]) { width:100px; }
 #page-index-m.page-authorinfo.content-jp .author-info-fields > colgroup > col:nth-child(2),
 #page-index-m.page-authorinfo.content-jp .author-info-fields > tbody > tr > td:nth-child(2):not([colspan]) { width:72px; }
 #page-index-m.page-authorinfo.content-en .author-work-label { flex-basis:6em; }
 #page-index-m.page-authorinfo.content-jp .author-work-label { flex-basis:5em; }
}
