/* Tenpodo legacy page templates. Scoped so the existing WP header/footer stay unchanged. */
.tp-wp-page{width:665px;max-width:100%;box-sizing:border-box;float:right;margin:0;padding:0;color:#333;font-family:"メイリオ","ヒラギノ角ゴ ProN",sans-serif;font-size:14px;line-height:1.8;text-align:left;overflow-wrap:anywhere}
.tp-wp-page *, .tp-wp-page *::before,.tp-wp-page *::after{box-sizing:border-box}
.tp-wp-page img{max-width:100%;height:auto;vertical-align:middle}
.tp-wp-page p{margin:0 0 1em}
.tp-wp-page a img{border:0}
.tp-wp-page .pankuzu{padding:5px 0 12px;font-size:12px}
.tp-wp-page .pankuzu a{text-decoration:none}
.tp-wp-page h2{font-size:18px;line-height:1.5;margin:20px 0 12px;clear:both}
.tp-wp-page .contact_btn_page{text-align:center;clear:both;padding:22px 0}
.tp-wp-page .newitem{max-width:100%}
.tp-wp-page table{max-width:100%;border-collapse:collapse}
.tp-wp-page td,.tp-wp-page th{overflow-wrap:anywhere}
/* LINE assessment explanatory list: keep three columns at desktop width. */
.tp-wp-line ul[style*="display:table"]{width:100%!important;table-layout:fixed}
.tp-wp-line ul[style*="display:table"] li{padding:0 8px;vertical-align:top}
/* Company information blocks */
.tp-wp-annai .annnai{display:flex;gap:15px;align-items:flex-start;margin-bottom:26px;clear:both}
.tp-wp-annai .annnai_L{flex:1;min-width:0;float:none;margin:0;width:auto}
.tp-wp-annai .annnai_R{flex:0 0 194px;float:none;margin:0}
.tp-wp-annai .annnai_L table{width:100%}
.tp-wp-annai .annnai_L th{width:95px;font-weight:400;text-align:left;vertical-align:top;padding:4px 8px 9px 0}
.tp-wp-annai .annnai_L td{padding:4px 0 9px;text-align:left;vertical-align:top}
/* Q&A table legacy markup */
.tp-wp-faq table{width:100%!important;margin:0 0 10px}
.tp-wp-faq table td{padding:12px;max-width:100%}
/* Product category thumbnails: five columns on desktop, three on mobile */
.tp-wp-ichiran #ichiran{padding:14px;background:transparent url("images/products/ichiran_bg.png") repeat;border-radius:5px}
.tp-wp-ichiran #ichiran ul{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;list-style:none;margin:8px 0 12px;padding:0}
.tp-wp-ichiran #ichiran ul li{margin:0!important;padding:0;float:none!important;min-width:0}
.tp-wp-ichiran #ichiran ul li:empty{display:none}
.tp-wp-ichiran #ichiran img{width:100%;height:auto}
.tp-wp-ichiran .newitem table{max-width:100%;}
.tp-wp-ichiran .newitem td img{max-width:100%;}
@media screen and (max-width:767px){
 .tp-wp-page{width:100%!important;max-width:100%!important;float:none!important;padding:14px 15px 24px;margin:0 auto 25px;font-size:16px;line-height:1.75}
 .tp-wp-page img,.tp-wp-page video,.tp-wp-page iframe{max-width:100%!important;height:auto!important}
 .tp-wp-page p img[style]{width:auto!important;max-width:100%!important;height:auto!important}
 .tp-wp-page h2{font-size:19px;margin:20px 0 12px}
 .tp-wp-page .pankuzu{font-size:13px}
 .tp-wp-line ul[style*="display:table"]{display:block!important;width:100%!important;margin:14px 0!important;padding:0!important}
 .tp-wp-line ul[style*="display:table"] li{display:block!important;width:100%!important;padding:10px 12px!important;margin-bottom:8px!important;border:1px solid #dedede;border-radius:3px}
 .tp-wp-annai .annnai{display:block;margin:0 0 24px}
 .tp-wp-annai .annnai_L,.tp-wp-annai .annnai_R{float:none!important;width:100%!important;max-width:100%!important;margin:0 0 8px!important}
 .tp-wp-annai .annnai_R{text-align:center}
 .tp-wp-annai .annnai_L th{width:95px!important;min-width:85px}
 .tp-wp-annai .annnai_L td{width:auto!important}
 .tp-wp-faq table{display:table!important;width:100%!important;max-width:100%!important}
 .tp-wp-faq table td{display:table-cell!important;width:auto!important;font-size:15px;line-height:1.75}
 .tp-wp-ichiran #ichiran{padding:10px}
 .tp-wp-ichiran #ichiran ul{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 8px}
 .tp-wp-ichiran .newitem{overflow-x:auto}
 .tp-wp-ichiran .newitem table{width:100%!important;max-width:100%!important;table-layout:fixed}
 .tp-wp-ichiran .newitem td{padding:3px!important;width:auto!important}
 .tp-wp-ichiran .newitem td img{width:100%!important;height:auto!important}
}
@media screen and (max-width:380px){.tp-wp-ichiran #ichiran ul{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* 2026-11-15: FIX original theme layout. Applies only to five converted pages
   and blog.php that opts in using .tp-blog-layout. */
@media screen and (min-width:768px) {
  body:has(#main.tp-wp-page) #contents,
  body:has(#main.tp-blog-layout) #contents {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  body #wrap:has(> #main.tp-wp-page),
  body #wrap:has(> #main.tp-blog-layout) {
    /* The original layout is 854px wide: 182px sidebar + 10px gutter + 662px text. */
    display:grid!important;
    grid-template-columns:182px minmax(0,1fr)!important;
    grid-template-rows:auto!important;
    column-gap:10px!important;
    align-items:start!important;
    width:854px!important;
    max-width:100%!important;
    min-width:0!important;
    float:none!important;
    box-sizing:border-box!important;
    margin-top:20px!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  body #wrap:has(> #main.tp-wp-page) > #main,
  body #wrap:has(> #main.tp-blog-layout) > #main {
    grid-column:2!important;
    grid-row:1!important;
    display:block!important;
    float:none!important;
    position:static!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  body #wrap:has(> #main.tp-wp-page) > #sub,
  body #wrap:has(> #main.tp-blog-layout) > #sub {
    grid-column:1!important;
    grid-row:1!important;
    display:block!important;
    float:none!important;
    position:static!important;
    width:178px!important;
    max-width:178px!important;
    min-width:178px!important;
    margin:0!important;
    box-sizing:content-box!important;
  }
  body #wrap:has(> #main.tp-wp-page) > #main img,
  body #wrap:has(> #main.tp-blog-layout) > #main img {
    max-width:100%!important;
    height:auto!important;
  }
}
@media screen and (max-width:767px){
  body #wrap:has(> #main.tp-wp-page),
  body #wrap:has(> #main.tp-blog-layout){
    display:block!important;float:none!important;
    width:100%!important;max-width:100%!important;
    box-sizing:border-box!important;
  }
  body #wrap:has(> #main.tp-wp-page) > #main,
  body #wrap:has(> #main.tp-blog-layout) > #main {
    width:100%!important;max-width:100%!important;
    min-width:0!important;float:none!important;
    box-sizing:border-box!important;
  }
  body #wrap:has(> #main.tp-wp-page) > #sub,
  body #wrap:has(> #main.tp-blog-layout) > #sub {display:none!important}
  body:has(#main.tp-wp-page) #contents,
  body:has(#main.tp-blog-layout) #contents {width:100%!important}
}
