:root{--paper:#f5f3ee;--white:#fff;--ink:#566174;--sub:#566174;--line:#d8d3cb;--line-dark:#bcb5ac;--red:#b33a32;--red-dark:#8f2923}*{box-sizing:border-box}html{scroll-padding-top:84px}body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif;line-height:1.55}a{color:inherit}button,input{font:inherit}.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.home-head{width:min(680px,calc(100% - 36px));margin:0 auto;padding:12vh 0 34px;text-align:center}.wordmark{display:inline-block;color:var(--red-dark);line-height:1;text-decoration:none;transform:rotate(-1deg)}.wordmark span{display:block;margin:0 0 6px;font-size:14px;font-weight:800;letter-spacing:.1em}.wordmark strong{display:block;font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;font-size:clamp(42px,10vw,70px);font-weight:900;letter-spacing:-.08em}.home-head>p{margin:24px 0 0;color:var(--text);font-size:15px}.home-head .coverage{margin-top:5px;color:var(--sub);font-size:12px}.home-main{width:min(720px,calc(100% - 32px));margin:0 auto}.search-form{display:grid;grid-template-columns:1fr auto;gap:9px}.search-form input{min-width:0;height:54px;padding:0 16px;border:1px solid var(--line-dark);border-radius:7px;background:var(--white);color:var(--ink);font-size:17px;outline:none}.search-form input:focus{border-color:var(--red);box-shadow:0 0 0 2px #b33a3222}.search-form button{min-width:88px;border:0;border-radius:7px;background:var(--red);color:#fff;font-weight:800;cursor:pointer}.search-form button:hover,.search-form button:focus-visible{background:var(--red-dark)}.search-status{min-height:24px;margin:11px 2px;color:var(--sub);font-size:13px}.search-results{display:grid;gap:10px;margin:0;padding:0;list-style:none}.search-result a{display:grid;grid-template-columns:70px 1fr 18px;align-items:center;gap:14px;min-height:86px;padding:14px 16px;border:1px solid var(--line);border-left:4px solid var(--red);border-radius:7px;background:var(--white);text-decoration:none}.search-result a:hover,.search-result a:focus-visible{border-color:#b8afa5;background:#fffdfa}.result-volume{color:var(--sub);font-size:13px}.result-copy span{display:block;color:var(--sub);font-size:12px}.result-copy strong{display:block;margin-top:2px;font-size:17px;line-height:1.4}.result-arrow{color:var(--red);font-size:20px}.index-links{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:34px 0 28px}.index-links a{padding:15px 17px;border-top:1px solid var(--line-dark);border-bottom:1px solid var(--line-dark);text-decoration:none}.index-links span{display:block;color:var(--sub);font-size:11px}.index-links strong{display:block;margin-top:3px;font-size:15px}.site-footer{display:flex;justify-content:center;gap:26px;width:min(720px,calc(100% - 32px));margin:48px auto 36px;color:var(--text);font-size:11px}.site-footer a{text-decoration:none}
.site-nav{position:sticky;top:0;z-index:20;border-bottom:1px solid var(--line);background:#f5f3eef5;backdrop-filter:blur(10px)}.nav-inner{display:flex;align-items:center;gap:24px;width:min(1380px,calc(100% - 30px));min-height:62px;margin:auto}.mini-mark{margin-right:auto;color:var(--red-dark);font-weight:900;text-decoration:none;letter-spacing:-.04em}.nav-search{display:flex;width:min(430px,48vw);gap:7px}.nav-search input{min-width:0;flex:1;height:39px;padding:0 11px;border:1px solid var(--line-dark);border-radius:5px;background:#fff}.nav-search button{padding:0 15px;border:0;border-radius:5px;background:var(--red);color:#fff;font-weight:700}.nav-links{display:flex;gap:15px;white-space:nowrap}.nav-links a{color:var(--sub);font-size:12px;text-decoration:none}.nav-links a[aria-current="page"]{color:var(--ink);font-weight:700}.page{width:min(1380px,calc(100% - 30px));margin:0 auto;padding:28px 0 48px}.page-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:14px}.page-head h1{margin:0;font-size:25px;letter-spacing:-.03em}.page-head p{margin:4px 0 0;color:var(--sub);font-size:13px}.counter{color:var(--sub);font-size:13px;white-space:nowrap}.back-link{display:inline-block;margin-bottom:18px;color:var(--sub);font-size:13px;text-decoration:none}
.table-app{position:relative}.table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px}.table-wrap{max-height:calc(100dvh - 150px);overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:6px;background:#fff}.data-table{width:100%;min-width:1190px;border-collapse:separate;border-spacing:0;font-size:13px}.data-table th,.data-table td{padding:8px 9px;border-bottom:1px solid #e8e4de;text-align:left;vertical-align:top}.data-table th{position:sticky;top:0;z-index:4;background:#ebe7e0;white-space:nowrap}.data-table tbody tr:last-child td{border-bottom:0}.data-table tbody tr:hover td{background:#fffdf8}.data-table th:first-child,.data-table td:first-child{position:sticky;left:0;z-index:3;width:58px;min-width:58px;background:#fff;box-shadow:1px 0 var(--line)}.data-table th:first-child{z-index:5;background:#ebe7e0}.data-table .story{width:245px;min-width:245px;font-weight:650}.data-table .person{width:142px;min-width:142px}.data-table .other{width:180px;min-width:180px}.absent{color:var(--text)}.active-filter{color:var(--red-dark);font-weight:700}.head-button{padding:4px 1px;border:0;background:none;color:inherit;font:inherit;font-weight:700;cursor:pointer;white-space:nowrap}.head-button[aria-pressed="true"]{color:var(--red-dark)}
.filter-pop{position:absolute;z-index:30;width:280px;padding:12px;border:1px solid var(--line-dark);border-radius:6px;background:#fff;box-shadow:0 10px 28px #3a30251f}.filter-pop[hidden]{display:none}.filter-pop.wide{width:330px}.pop-title{margin-bottom:7px;font-weight:750}.field-title{margin:8px 0 3px;font-size:12px;font-weight:700}.filter-pop select,.filter-pop input[type="search"]{display:block;width:100%;min-height:39px;margin-top:2px;padding:6px 8px;border:1px solid var(--line-dark);border-radius:4px;background:#fff;color:inherit;font-size:16px}.check-all,.choice-list label{display:flex;align-items:center;gap:8px;margin:0;cursor:pointer}.check-all{padding:7px 2px}.choice-list{max-height:240px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:4px}.choice-list label{padding:6px}.choice-list label+label{border-top:1px solid #eeeae4}.choice-list input,.check-all input{width:18px;height:18px;flex:none}.pop-actions{display:flex;justify-content:flex-end;margin-top:10px}.pop-actions button{padding:7px 13px;border:1px solid var(--red);border-radius:4px;background:var(--red);color:#fff;font-weight:700}.no-options{padding:8px;color:var(--sub)}
.simple-filter{display:grid;grid-template-columns:minmax(220px,420px) auto;gap:8px;margin-bottom:12px}.simple-filter input{height:42px;padding:0 11px;border:1px solid var(--line-dark);border-radius:5px;background:#fff}.simple-filter button{padding:0 16px;border:1px solid var(--line-dark);border-radius:5px;background:var(--white)}.invention-table{min-width:690px}.invention-table th:first-child,.invention-table td:first-child{position:static;width:auto;box-shadow:none}.invention-table .item{width:48%;font-weight:650}.invention-table .vol{width:70px}.invention-table .episode-name{width:44%}
.episode-page{width:min(780px,calc(100% - 30px));margin:0 auto;padding:30px 0 60px}.episode-title{padding-bottom:18px;border-bottom:2px solid var(--ink)}.episode-title p{margin:0 0 5px;color:var(--red-dark);font-size:13px;font-weight:750}.episode-title h1{margin:0;font-size:clamp(24px,6vw,34px);line-height:1.35}.detail-section{padding:25px 0;border-bottom:1px solid var(--line)}.detail-section h2{margin:0 0 13px;font-size:18px}.detail-list{margin:0;padding:0;list-style:none}.detail-list li{display:grid;grid-template-columns:minmax(130px,220px) 1fr;gap:18px;padding:8px 0;border-top:1px dotted var(--line-dark)}.detail-list li:first-child{border-top:0}.detail-list span:last-child{color:var(--text)}.about-copy{width:min(700px,calc(100% - 30px));margin:0 auto;padding:50px 0 70px}.about-copy h1{font-size:26px}.about-copy p{margin:1.2em 0}
@media(max-width:700px){.home-head{padding-top:10vh}.wordmark strong{font-size:52px}.home-head>p{font-size:14px}.home-main{width:min(100% - 24px,720px)}.search-form input{height:50px}.search-form button{min-width:76px}.index-links{grid-template-columns:1fr;margin-top:28px}.site-footer{flex-direction:column;align-items:center;gap:8px}.nav-inner{flex-wrap:wrap;gap:8px 12px;padding:9px 0}.mini-mark{width:100%;font-size:14px}.nav-search{order:3;width:100%}.nav-links{margin-left:auto}.page{width:min(100% - 20px,1380px);padding-top:18px}.page-head{display:block}.counter{display:block;margin-top:5px}.table-wrap{max-height:calc(100dvh - 184px)}.data-table{font-size:12px}.data-table th,.data-table td{padding:7px}.data-table .story{width:170px;min-width:170px}.filter-pop,.filter-pop.wide{position:fixed;left:10px!important;right:10px;width:auto;max-height:calc(100dvh - 30px);overflow:auto}.detail-list li{grid-template-columns:1fr;gap:1px}.search-result a{grid-template-columns:58px 1fr 14px;padding:12px}.result-copy strong{font-size:15px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* public color override */
:root{
  --bg:#eff3fc;
  --paper:#ffffff;
  --ink:#566174;
  --sub:#566174;
  --line:#cdd7e0;
  --accent:#111F4C;
}
body{background:#eff3fc;color:var(--text)}
.site-nav,.search-result a,.entry-links a,.table-wrap,.detail-section,.simple-filter{background:#fff}
a{color:var(--text)}
button{background:#111F4C;color:#fff;border-color:#111F4C}
.search-form input,.nav-search input,.simple-filter input{border-color:#bdcad3;background:#fff;color:var(--text)}
.result-volume,.counter{color:var(--text)}

/* 2026-09 public overrides */
html,body{background:#eff3fd!important;color:var(--text)!important}
h1,h2,h3,strong,.mini-mark{color:var(--text)!important}
a{color:var(--text)}
.search-form button,.nav-search button,.simple-filter button{background:#111F4C!important;border-color:#111F4C!important;color:#fff!important}
.search-result{border-left-color:#111F4C!important}
.result-arrow,.result-volume{color:var(--text)!important}
.result-toggle{width:100%;display:flex;align-items:center;text-align:left;background:#fff!important;color:var(--text)!important;border:0!important;padding:18px 16px;cursor:pointer}
.result-detail{padding:0 20px 18px 86px;background:#fff;border-top:1px solid #e0e7f0}
.result-detail-title{font-weight:700;margin:14px 0 6px;color:var(--text)}
.result-detail ul{margin:0;padding-left:1.3em}
.fan-note{display:block;margin-top:8px;color:var(--text);font-size:.9rem}

/* KC_PUBLIC_V3_START */
:root{--bg:#f2f4f7;--paper:#fff;--text:#566174;--muted:#566174;--teal:#111F4C;--line:#d5dce7}
html,body{background:var(--bg)!important;color:var(--text)!important}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Sans","Yu Gothic",sans-serif}
h1,h2,h3{color:var(--teal)!important}.topbar{max-width:1180px;margin:22px auto 0;padding:0 24px}.site-brand{display:block;width:max-content;color:var(--teal)!important;text-decoration:none;font-weight:750;font-size:20px;margin-bottom:18px}.main-tabs{display:flex;border-bottom:1px solid var(--line);gap:26px}.main-tabs a{padding:10px 2px 12px;text-decoration:none;color:var(--text)!important;font-weight:650}.main-tabs a[aria-current=page]{color:var(--teal)!important;border-bottom:3px solid var(--teal)}
.main-page{max-width:900px;margin:52px auto;padding:0 24px;min-height:62vh}.wide-page{max-width:1320px}.main-page>h1,.page-head h1{font-size:34px;margin:0 0 12px}.page-intro,.page-head p{color:var(--muted)}
.search-form{display:flex;gap:10px;margin-top:32px}.search-form input{flex:1;background:#fff!important;color:var(--text)!important;border:1px solid #cbd3df!important;border-radius:7px;padding:14px 15px;font-size:16px;outline:none!important}.search-form input:focus{border-color:var(--teal)!important;box-shadow:0 0 0 3px rgba(17,31,76,.16)!important}.search-form button,.nav-search button,.simple-filter button{background:var(--teal)!important;border:1px solid var(--teal)!important;color:#fff!important;border-radius:7px;padding:0 22px;font-weight:700}
.search-status{color:var(--muted);margin:12px 0}.search-results{list-style:none;padding:0;margin:0;display:grid;gap:12px}.search-result{display:grid;grid-template-columns:minmax(240px,.9fr) minmax(260px,1.1fr);background:#fff;border:1px solid var(--line)!important;border-left:4px solid var(--teal)!important;border-radius:8px;overflow:hidden}.result-story{padding:18px;display:flex;gap:14px;align-items:flex-start}.result-volume{color:var(--teal)!important;font-weight:700;white-space:nowrap}.result-story strong{display:block;color:var(--teal)!important;font-size:17px;margin-top:3px}.result-story span:not(.result-volume){color:var(--muted)}.result-inventions{padding:18px;border-left:1px solid #dfe6ef;color:var(--text)}.result-inventions b{display:block;color:var(--teal);margin-bottom:7px}.result-inventions ul{margin:0;padding-left:1.2em}.result-inventions .none{color:var(--text)}
.page-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:24px}.counter{color:var(--muted)!important}
.invention-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:26px}.inv-card{background:#fff;border:1px solid var(--line);border-radius:9px;overflow:hidden;align-self:start}.inv-card summary{list-style:none;cursor:pointer;padding:18px 46px 18px 18px;position:relative}.inv-card summary::-webkit-details-marker{display:none}.inv-card summary:after{content:"＋";position:absolute;right:18px;top:50%;transform:translateY(-50%);color:var(--teal);font-size:20px}.inv-card[open] summary:after{content:"−"}.inv-card strong{display:block;color:var(--teal)!important;margin-top:4px;font-size:16px}.inv-meta{color:var(--muted);font-size:12px}.inv-count{position:absolute;right:48px;top:17px;color:var(--muted);font-size:12px}.inv-items{border-top:1px solid #e1e8f1}.inv-items div{padding:12px 18px;border-bottom:1px solid #ebf0f9;color:var(--text)}.inv-items div:last-child{border-bottom:0}
.table-wrap,.filter-pop{color:var(--text)!important}.data-table,.data-table td,.data-table th{color:var(--text)!important}.head-button{color:var(--teal)!important}
.site-footer{max-width:1180px;margin:80px auto 28px;padding:22px 24px 0;border-top:1px solid var(--line);display:flex;gap:18px;justify-content:space-between;color:var(--muted);font-size:13px}.site-footer p{margin:0}.site-footer a{color:var(--teal)!important}.about-copy{max-width:760px}.about-copy p{font-size:16px;line-height:1.9;color:var(--text)}
a{color:var(--teal)}
@media(max-width:900px){.invention-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.search-result{grid-template-columns:1fr}.result-inventions{border-left:0;border-top:1px solid #dfe6ef}}
@media(max-width:620px){.topbar{padding:0 16px}.site-brand{font-size:18px}.main-tabs{gap:0;justify-content:space-between}.main-tabs a{font-size:12px}.main-page{margin-top:34px;padding:0 16px}.main-page>h1,.page-head h1{font-size:27px}.search-form{gap:7px}.search-form button{padding:0 16px}.invention-cards{grid-template-columns:1fr}.site-footer{margin-top:55px;padding:18px 16px 0;display:block}.site-footer a{display:inline-block;margin-top:8px}}
/* KC_PUBLIC_V3_END */

.inv-episode{background:#fff;border:1px solid var(--line);border-radius:9px;margin:0 0 16px;overflow:hidden}
.inv-episode>header{display:grid;grid-template-columns:70px 1fr auto;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line)}
.inv-episode>header span,.inv-episode>header small{color:var(--muted)}
.inv-episode>header h2{font-size:17px!important;margin:0!important}
.inv-item{border-bottom:1px solid #ebf0f9}.inv-item:last-child{border-bottom:0}
.inv-item summary{cursor:pointer;list-style:none;padding:14px 18px;display:flex;gap:10px;align-items:center}
.inv-item summary::-webkit-details-marker{display:none}.inv-item summary:before{content:"＋";color:var(--teal);font-weight:700;width:16px}
.inv-item[open] summary:before{content:"−"}
.inv-item summary em{font-size:11px;font-style:normal;color:var(--text);border:1px solid #cbd3df;border-radius:4px;padding:2px 6px;margin-left:auto;white-space:nowrap}
.inv-detail{padding:0 18px 16px 44px;color:var(--text)}
.inv-detail blockquote{margin:2px 0 8px;padding-left:13px;border-left:3px solid #c5d4de;line-height:1.7}
.inv-detail p{margin:6px 0;color:var(--muted);font-size:13px}
.description-note{font-size:11px;color:var(--muted);margin:28px 3px 0;line-height:1.7}
@media(max-width:620px){.inv-episode>header{grid-template-columns:50px 1fr auto;padding:14px}.inv-item summary{padding:13px 14px}.inv-detail{padding:0 14px 14px 40px}}

/* invention cards v4 */
.invention-cards{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  margin-top:26px!important;
}
.book-episode{
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  align-self:start;
}
.book-episode-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:15px 15px 12px;
  border-bottom:1px solid #e3e9f2;
}
.book-volume{
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-bottom:3px;
}
.book-episode-head h2{
  margin:0!important;
  font-size:16px!important;
  line-height:1.45;
  color:var(--teal)!important;
}
.book-count{
  flex:0 0 auto;
  min-width:30px;
  height:25px;
  padding:0 8px;
  border-radius:999px;
  background:var(--teal);
  color:#fff;
  font-size:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}
.book-item{
  border-bottom:1px solid #ebf0f9;
}
.book-item:last-child{
  border-bottom:0;
}
.book-item summary{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 18px;
  gap:8px;
  align-items:center;
  padding:13px 14px;
  cursor:pointer;
  list-style:none;
  color:var(--text);
}
.book-item summary::-webkit-details-marker{
  display:none;
}
.book-item-name{
  font-weight:650;
  line-height:1.45;
}
.description-badge{
  font-size:10px;
  color:var(--text);
  border:1px solid #cbd3df;
  border-radius:4px;
  padding:2px 5px;
  white-space:nowrap;
}
.book-plus:before{
  content:"＋";
  color:var(--teal);
  font-size:18px;
  line-height:1;
}
.book-item[open] .book-plus:before{
  content:"−";
}
.book-detail{
  padding:0 14px 13px;
}
.book-quote{
  background:#f4f6fa;
  border-radius:6px;
  padding:10px 11px;
  color:var(--text);
  font-size:12px;
  line-height:1.7;
}
.description-note{
  margin:28px 2px 0;
  font-size:11px;
  line-height:1.7;
  color:var(--text);
}
.description-note b{
  color:var(--text);
}
@media(max-width:1050px){
  .invention-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:780px){
  .invention-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:520px){
  .invention-cards{grid-template-columns:1fr!important}
}

/* invention layout v6 */
.invention-cards{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
  margin-top:28px!important;
}

.book-episode{
  display:flex!important;
  flex-direction:column!important;
  align-self:stretch!important;
  height:100%!important;
  min-width:0!important;
  background:#fff!important;
  border:1px solid #d5dce7!important;
  border-radius:10px!important;
  overflow:hidden!important;
}

.book-episode-head{
  display:block!important;
  padding:16px 15px 14px!important;
  border-bottom:1px solid #e3e9f2!important;
}

.book-volume{
  display:block!important;
  margin:0 0 5px!important;
  color:var(--text)!important;
  font-size:11px!important;
  font-weight:500!important;
}

.book-episode-head h2{
  margin:0!important;
  color:var(--text)!important;
  font-size:17px!important;
  line-height:1.4!important;
  font-weight:750!important;
  letter-spacing:-.015em!important;
}

.book-items{
  flex:1!important;
  display:flex!important;
  flex-direction:column!important;
}

.book-item{
  border-bottom:1px solid #ebf0f9!important;
}

.book-item:last-child{
  border-bottom:0!important;
}

.book-item summary{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 18px!important;
  align-items:center!important;
  gap:8px!important;
  min-height:48px!important;
  padding:12px 14px!important;
  list-style:none!important;
  cursor:pointer!important;
}

.book-item summary::-webkit-details-marker{
  display:none!important;
}

.book-item-name{
  color:var(--text)!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1.5!important;
}

.book-plus{
  text-align:right!important;
}

.book-plus:before{
  content:"＋"!important;
  color:var(--warm)!important;
  font-size:17px!important;
  font-weight:500!important;
}

.book-item[open] .book-plus:before{
  content:"−"!important;
}

.book-detail{
  padding:0 14px 14px!important;
}

.description-badge{
  display:inline-block!important;
  margin:0 0 8px!important;
  padding:2px 7px!important;
  border:1px solid #c7d1db!important;
  border-radius:999px!important;
  background:#fff!important;
  color:var(--text)!important;
  font-size:10px!important;
  line-height:1.5!important;
  font-weight:600!important;
}

.book-quote{
  padding:10px 11px!important;
  border-radius:6px!important;
  background:#f3f5f9!important;
  color:var(--text)!important;
  font-size:12px!important;
  line-height:1.7!important;
}

.description-note{
  margin:28px 2px 0!important;
  color:var(--text)!important;
  font-size:11px!important;
  line-height:1.7!important;
}

.description-note b{
  color:var(--text)!important;
}

.about-copy{
  max-width:760px!important;
}

.about-copy>p{
  margin:0 0 24px!important;
  color:var(--text)!important;
  font-size:15px!important;
  line-height:2!important;
}

.about-links{
  margin-top:42px!important;
  padding-top:20px!important;
  border-top:1px solid #d5dde6!important;
}

.about-links p{
  margin:8px 0!important;
  color:var(--text)!important;
  font-size:13px!important;
  line-height:1.7!important;
}

.about-links a{
  color:var(--text)!important;
}

@media(max-width:1050px){
  .invention-cards{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media(max-width:780px){
  .invention-cards{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:520px){
  .invention-cards{
    grid-template-columns:1fr!important;
  }
}

/* polish v7 */
.site-brand{
  color:var(--text)!important;
}

/* キャラクター表の見出しをベージュからグレーへ */
.data-table thead,
.data-table thead tr,
.data-table thead th{
  background:#e9edf5!important;
  color:var(--text)!important;
}

.data-table tbody tr:nth-child(even){
  background:#f6f8fb!important;
}

/* 検索 */
.search-form{
  margin-top:28px!important;
}

.sort-controls{
  display:flex;
  gap:8px;
  margin:12px 0 15px;
}

.sort-controls[hidden]{
  display:none!important;
}

.sort-controls button{
  appearance:none;
  border:1px solid #c4d0da;
  border-radius:999px;
  background:#fff;
  color:var(--text);
  padding:6px 12px;
  font-size:12px;
  font-weight:650;
  cursor:pointer;
}

.sort-controls button.active{
  border-color:#111F4C;
  background:#111F4C;
  color:#fff;
}

.search-results{
  gap:13px!important;
}

.search-result{
  grid-template-columns:minmax(280px,.95fr) minmax(270px,1.05fr)!important;
}

.result-story{
  display:block!important;
  padding:20px!important;
}

.result-meta{
  margin-bottom:7px;
  color:var(--text)!important;
  font-size:12px!important;
  font-weight:550!important;
}

.result-title{
  display:block!important;
  color:var(--text)!important;
  font-size:20px!important;
  line-height:1.45!important;
  font-weight:760!important;
}

.result-inventions{
  padding:20px!important;
}

.result-inventions>b{
  margin-bottom:9px!important;
  font-size:13px!important;
}

.result-inventions li{
  margin:4px 0;
  color:var(--text);
  line-height:1.5;
}

@media(max-width:900px){
  .search-result{
    grid-template-columns:1fr!important;
  }
}

/* SEARCH RESULT FIX */
.search-result{
  display:grid!important;
  grid-template-columns:minmax(0,1.45fr) minmax(260px,.75fr)!important;
  padding:0!important;
  overflow:hidden;
}
.result-main{
  display:flex;
  gap:14px;
  padding:14px 16px;
  min-width:0;
}
.result-volume{
  flex:none;
  font-weight:700;
}
.result-copy{
  min-width:0;
}
.result-copy>span{
  display:block;
  font-size:12px;
  color:var(--text);
}
.result-copy>strong{
  display:block;
  margin-top:2px;
}
.result-quote{
  margin:12px 0 0!important;
  color:var(--text);
  font-size:14px;
  line-height:1.65;
}
.search-hit{
  padding:0 .06em;
  background:#fff0a8;
  color:inherit;
  font-weight:750;
}
.result-inventions{
  border-left:1px solid #d7e0e9;
  padding:16px 18px;
}
.result-inventions>strong{
  display:block;
  margin-bottom:7px;
}
.result-inventions ul{
  margin:0;
  padding-left:18px;
}
.result-inventions li{
  margin:4px 0;
  color:var(--text);
}
.sort-controls{
  display:flex;
  gap:8px;
  margin:10px 0 16px;
}
.sort-controls button{
  padding:7px 12px;
  border:1px solid #bbcad3!important;
  border-radius:6px;
  background:#fff!important;
  color:var(--text)!important;
}
.sort-controls button[aria-pressed="true"]{
  background:#111F4C!important;
  color:#fff!important;
  border-color:#111F4C!important;
}

/* CHARACTER TABLE: page scroll, original-like sticky columns/header */
.characters-page .counter,
#table-count{
  display:none!important;
}
.table-app{
  position:relative;
}
.characters-page .table-wrap,
body:has(#table-app) .table-wrap{
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  overscroll-behavior:auto!important;
  border:1px solid #d9dfe9;
  border-radius:8px;
  background:#fff;
}
body:has(#table-app) .data-table{
  border-collapse:separate!important;
  border-spacing:0!important;
  min-width:1230px!important;
  width:100%!important;
  font-size:.89rem;
}
body:has(#table-app) .data-table th,
body:has(#table-app) .data-table td{
  text-align:left;
  vertical-align:top;
  padding:8px 9px;
  border-bottom:1px solid #e3e8f3;
}
body:has(#table-app) .data-table th{
  position:sticky!important;
  top:0!important;
  z-index:3!important;
  background:#edf1f7!important;
  white-space:nowrap;
}
body:has(#table-app) .data-table th:first-child,
body:has(#table-app) .data-table td:first-child{
  position:sticky!important;
  left:0!important;
  z-index:2!important;
  background:#fff!important;
  box-shadow:1px 0 #d9dfe9;
}
body:has(#table-app) .data-table th:first-child{
  z-index:4!important;
  background:#edf1f7!important;
}
body:has(#table-app) .data-table th:nth-child(1),
body:has(#table-app) .data-table td:nth-child(1){
  width:56px;
  min-width:56px;
  white-space:nowrap;
}
body:has(#table-app) .data-table th:nth-child(2),
body:has(#table-app) .data-table td:nth-child(2){
  width:245px;
  min-width:245px;
}
body:has(#table-app) .data-table th:nth-child(n+3),
body:has(#table-app) .data-table td:nth-child(n+3){
  min-width:143px;
  width:143px;
}

.description-note{
  margin:20px 0 28px!important;
  padding:12px 14px!important;
  border:1px solid #cad8e1;
  border-radius:7px;
  background:#fff;
  color:var(--text)!important;
  font-size:13px!important;
  line-height:1.7!important;
}
.description-note b{
  color:var(--text)!important;
  font-size:13px!important;
}

@media(max-width:900px){
  .search-result{
    grid-template-columns:1fr!important;
  }
  .result-inventions{
    border-left:0;
    border-top:1px solid #d7e0e9;
  }
}

@media(max-width:620px){
  body:has(#table-app) .data-table{
    min-width:1120px!important;
    font-size:13px;
  }
  body:has(#table-app) .data-table th,
  body:has(#table-app) .data-table td{
    padding:7px 8px;
  }
}

/* 2026-09-29 compact public adjustments */
body{color:var(--text)!important}
p,li,td,summary,.book-item-name,.book-detail{color:var(--text)}
.site-footer a{color:var(--muted)!important}
.search-form input::placeholder,.nav-search input::placeholder{color:var(--text)!important;opacity:.25}
.main-tabs a{font-size:15px!important}
.main-page>h1,.page-head h1,.inventory-title h1{font-size:31px!important;line-height:1.3!important}
.result-copy>strong{font-size:19px!important;line-height:1.4!important}

.result-inventions{font-size:12px!important;line-height:1.45}
.result-inventions>strong{font-size:12px!important;margin-bottom:5px!important}
.result-inventions ul{padding-left:16px!important;list-style-type:disc!important}
.result-inventions li{margin:2px 0!important;font-size:12px!important;color:var(--text)!important}
.result-inventions li::marker{color:var(--text)!important}

.inventory-title{display:flex;align-items:baseline;gap:18px;margin-bottom:24px}
.inventory-title h1{margin:0!important;flex:none}
.inventory-title .description-note{margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--text)!important;font-size:13px!important;line-height:1.45!important}
.inventory-title .description-note b{color:var(--text)!important;font-size:13px!important}

.about-copy>h1{margin-bottom:24px}
.about-copy>p{margin:0 0 18px!important;font-size:15px!important;line-height:1.62!important;color:var(--text)!important}
.about-links{margin-top:28px!important;padding-top:16px!important}
.about-links p{margin:5px 0!important;line-height:1.55!important;color:var(--text)!important}

body:has(#table-app) .main-page{max-width:none!important;width:100%!important;padding-left:24px!important;padding-right:24px!important}
body:has(#table-app) .page-head{width:100%!important;max-width:1272px!important;margin-left:auto!important;margin-right:auto!important}
body:has(#table-app) .table-wrap{max-height:none!important;overflow:visible!important;border-radius:6px!important}
body:has(#table-app) .data-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;font-size:13px!important}
body:has(#table-app) .data-table th,body:has(#table-app) .data-table td{min-width:0!important;width:auto!important;padding:5px 4px!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.35!important}
body:has(#table-app) .data-table th{position:sticky!important;top:0!important;z-index:8!important}
body:has(#table-app) .data-table th:first-child,body:has(#table-app) .data-table td:first-child{position:static!important;box-shadow:none!important}
body:has(#table-app) .data-table th:first-child{position:sticky!important;top:0!important;z-index:8!important}
body:has(#table-app) .data-table th:nth-child(1),body:has(#table-app) .data-table td:nth-child(1){width:4.5%!important}
body:has(#table-app) .data-table th:nth-child(2),body:has(#table-app) .data-table td:nth-child(2){width:24.5%!important}
body:has(#table-app) .data-table th:nth-child(n+3):nth-child(-n+8),body:has(#table-app) .data-table td:nth-child(n+3):nth-child(-n+8){width:9%!important}
body:has(#table-app) .data-table th:nth-child(9),body:has(#table-app) .data-table td:nth-child(9){width:17%!important}
body:has(#table-app) .head-button{white-space:normal!important;text-align:left!important;line-height:1.25!important;padding:2px 0!important}

@media(max-width:620px){
  .inventory-title{display:block;margin-bottom:18px}
  .inventory-title .description-note{margin-top:7px!important}
  body:has(#table-app) .main-page{padding-left:8px!important;padding-right:8px!important}
  body:has(#table-app) .page-head{max-width:none!important;margin-bottom:10px!important}
  body:has(#table-app) .data-table{min-width:0!important;font-size:8px!important}
  body:has(#table-app) .data-table th,body:has(#table-app) .data-table td{padding:4px 2px!important;line-height:1.25!important}
  .main-tabs a{font-size:11.5px!important}
  .main-page>h1,.page-head h1,.inventory-title h1{font-size:25px!important}
}

/* 2026-09-30 unified titles, compact character table and entrance */
.main-page>h1,.page-head,.inventory-title{ text-align:center!important }
.page-head,.inventory-title{ justify-content:center!important }
.page-head>div{ width:100% }
.search-page>h1{ margin-left:auto!important;margin-right:auto!important }
body:has(#table-app) .main-page{ padding-left:56px!important;padding-right:56px!important }
body:has(#table-app) .page-head{ max-width:none!important }
body:has(#table-app) .table-app{ max-width:1560px;margin-left:auto;margin-right:auto }
body:has(#table-app) .data-table th:nth-child(1),body:has(#table-app) .data-table td:nth-child(1){ width:4.5%!important }
body:has(#table-app) .data-table{ font-size:16px!important }
body:has(#table-app) .data-table th:nth-child(2),body:has(#table-app) .data-table td:nth-child(2){ width:29%!important }
body:has(#table-app) .data-table th:nth-child(n+3),body:has(#table-app) .data-table td:nth-child(n+3){ width:9.5%!important }
body:has(#table-app) .data-table th,
body:has(#table-app) .data-table th:first-child{ top:12px!important }

.home-page{ width:min(820px,calc(100% - 48px));margin:78px auto 0;min-height:58vh }
.home-hero{ text-align:center }
.home-logo{ display:flex;flex-direction:column;align-items:center;gap:15px }
.home-logo-flask{ display:block;width:58px;height:auto }
.home-logo-wordmark{ display:block;width:min(480px,76vw);height:auto }
.home-hero>p{ max-width:650px;margin:22px auto 0;color:var(--muted);font-size:14px;line-height:1.8 }
.home-search{ display:flex;gap:9px;max-width:700px;margin:32px auto 0 }
.home-search input{ flex:1;min-width:0;height:52px;border:1px solid #cbd3df;border-radius:7px;background:#fff;padding:0 16px;color:var(--text);font-size:16px }
.home-search input::placeholder{ color:var(--text);opacity:.25 }
.home-search button{ min-width:86px;border:1px solid var(--teal);border-radius:7px;background:var(--teal);color:#fff;font-weight:700 }
.home-menu{ --menu-lead:52px;display:flex;flex-direction:column;width:max-content;max-width:100%;margin:60px auto 0;transform:translateX(calc(var(--menu-lead)/-2)) }
.home-menu a{ display:grid;grid-template-columns:32px auto;align-items:center;column-gap:20px;padding:18px 6px;color:var(--text)!important;text-decoration:none;border-bottom:1px solid var(--line) }
.home-menu a:last-child{ border-bottom:0 }
.home-menu b{ flex:none;color:var(--teal);font-size:32px;font-weight:400;line-height:1 }
.home-menu> a > span{ color:var(--teal);font-size:21px;font-weight:400;line-height:1.45 }
.mobile-volume{ display:none }

/* Sticky navigation masks scrolled rows; the table headings sit directly below it. */
body:has(#table-app) .topbar{
  position:sticky;top:0;z-index:30;max-width:none;margin:0;
  padding:22px max(24px,calc((100vw - 1180px)/2)) 0;
  background:var(--bg,#f2f7ff);
}
body:has(#table-app) .data-table th,
body:has(#table-app) .data-table th:first-child{ top:111px!important }

.home-body{ min-height:100dvh;position:relative }
.home-page{
  display:flex;flex-direction:column;justify-content:center;
  min-height:100dvh;margin:0 auto;padding:105px 0;
}
.home-menu{ margin-top:42px }
.home-menu a{ justify-content:flex-start;text-align:left }
.home-body>.site-footer{ position:absolute;left:0;right:0;bottom:28px;margin:0 auto }

@media(max-width:700px){
  body:has(#table-app) .main-page{ padding-left:8px!important;padding-right:8px!important }
  body:has(#table-app) .topbar{ padding:14px 16px 0 }
  body:has(#table-app) .data-table{ font-size:11px!important }
  body:has(#table-app) .data-table th,
  body:has(#table-app) .data-table th:first-child{ top:110px!important }
  body:has(#table-app) .data-table th,
  body:has(#table-app) .data-table td{ padding:3px 1px!important;line-height:1.2!important }
  body:has(#table-app) .data-table th:nth-child(1),body:has(#table-app) .data-table td:nth-child(1){ width:3.5%!important }
  body:has(#table-app) .data-table th:nth-child(2),body:has(#table-app) .data-table td:nth-child(2){ width:23.5%!important }
  body:has(#table-app) .data-table th:nth-child(n+3),body:has(#table-app) .data-table td:nth-child(n+3){ width:10.43%!important }
  .desktop-volume{ display:none }
  .mobile-volume{ display:inline }
  .home-page{ width:min(100% - 32px,980px);margin:0 auto;min-height:100dvh;padding:100px 0 }
  .home-logo-flask{ width:48px }
  .home-logo-wordmark{ width:min(390px,82vw) }
  .home-search{ margin-top:25px }
  .home-menu{ --menu-lead:42px;margin-top:34px }
  .home-menu a{ grid-template-columns:27px auto;column-gap:15px;padding:16px 2px }
  .home-menu b{ font-size:27px }
  .home-menu> a > span{ font-size:17px }
}
@media(max-height:650px){
  .home-page{ min-height:auto;padding:70px 0 120px }
}

/* Shared branding and stable sticky table geometry. */
:root{--warm:#D0D113;--table-nav-height:120px}
.site-brand img{display:block;width:210px;height:auto}
body,button,input,select,textarea{font-family:"IBM Plex Sans JP","Hiragino Sans","Yu Gothic",sans-serif}
strong,b,h1,h2,h3,th{font-weight:700}
.home-logo img{height:auto;object-fit:contain;flex-shrink:0}
.home-menu .menu-star{visibility:hidden}
.home-menu a{position:relative}
.home-menu a::before{content:"";position:absolute;left:6px;width:36px;height:36px;background:var(--warm);mask:url('/assets/kagaku-star.png') center/contain no-repeat;-webkit-mask:url('/assets/kagaku-star.png') center/contain no-repeat}
.site-footer a:hover,.about-copy a:hover,.main-tabs a:hover,.home-menu a:hover>span{color:var(--warm)!important}
.search-note{margin:12px 2px 0;color:var(--muted);font-size:12px;line-height:1.6}
.main-tabs{justify-content:flex-start;gap:24px}
.main-tabs a[aria-current=page]{border-bottom-color:var(--warm)}
.site-footer{border-top:0}
.home-page{justify-content:flex-start;padding:70px 0 130px}
.home-logo{gap:4px}
.home-logo-flask{width:74px}
.home-menu{transform:none}
.home-menu a{border-bottom:0;grid-template-columns:36px auto;column-gap:16px}
.menu-star{width:36px;height:36px;object-fit:contain}
.home-body>.site-footer{border-top:0}
.book-plus{color:var(--warm)}
.book-empty{padding:18px;color:var(--muted)}
body:has(#table-app) .topbar{padding-bottom:14px;background:var(--bg);isolation:isolate}
body:has(#table-app) .topbar::before{content:"";position:fixed;top:0;left:0;right:0;height:calc(var(--table-nav-height) + 1px);background:var(--bg);z-index:-1}
body:has(#table-app) .data-table th,
body:has(#table-app) .data-table th:first-child{top:var(--table-nav-height)!important}
@media(max-width:700px){
 .site-brand img{width:176px}
 .main-tabs{justify-content:flex-start;gap:15px}
 .main-tabs a{font-size:10.5px!important;padding:7px 0 9px;white-space:nowrap}
 .home-page{padding:50px 0 120px}
 .home-logo-flask{width:60px}
 .home-menu a{grid-template-columns:30px auto;column-gap:12px}
 .menu-star{width:30px;height:30px}
 .home-menu a::before{left:2px;width:30px;height:30px}
 body:has(#table-app) .topbar{padding-bottom:14px}
}
.site-footer,.site-footer p,.site-footer a{color:var(--muted)!important}
.site-footer a{text-decoration-line:underline;text-decoration-color:color-mix(in srgb,currentColor 35%,transparent);text-decoration-thickness:1px;text-underline-offset:3px}
.home-body>.site-footer{display:flex;justify-content:center;align-items:center;text-align:center}
@media(max-width:700px){.site-footer,.site-footer p,.site-footer a{font-size:10.5px}}

/* Preserve hand-drawn shapes while applying the shared palette. */
.logo-flask-wrap,.logo-wordmark-wrap{display:block;background:var(--teal);flex-shrink:0;max-width:100%}
.logo-flask-wrap{mask:url('/assets/kagaku-logo-flask.png') center/contain no-repeat;-webkit-mask:url('/assets/kagaku-logo-flask.png') center/contain no-repeat}
.logo-wordmark-wrap{mask:url('/assets/kagaku-logo-wordmark.png?v=2') center/contain no-repeat;-webkit-mask:url('/assets/kagaku-logo-wordmark.png?v=2') center/contain no-repeat}
.logo-flask-wrap img,.logo-wordmark-wrap img,.site-brand img{opacity:0}
.site-brand{position:relative}
.site-brand::before{content:"";position:absolute;inset:0;background:var(--teal);mask:url('/assets/kagaku-logo-wordmark.png?v=2') center/contain no-repeat;-webkit-mask:url('/assets/kagaku-logo-wordmark.png?v=2') center/contain no-repeat}

/* Cool neutral palette with a pale-yellow row hover. */
body:has(#table-app) .data-table tbody tr:hover td{background:#f9fad9!important}
/* Keep navigation and links as navy accents; all grey text uses --text. */
.mini-mark,.result-arrow,.result-detail-title,.result-toggle,.about-links a{color:var(--teal)!important}
