@charset "utf-8";

@media screen and (max-width: 767px) {
  html,
  body {
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: #f3f3f3;
  }

  body {
    font-size: 16px;
    line-height: 1.75;
    -webkit-text-size-adjust: 100%;
  }

  #container,
  #header,
  #top_bar,
  #trunk,
  #main,
  #side_bar,
  #footer {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  #container {
    min-height: 100vh;
    margin: 0;
    padding-bottom: 0;
    background: #fff;
  }

  #header {
    height: auto;
    padding: 16px 16px 0;
    background-position: center top;
    border-top: 4px solid #333;
  }

  #header h1 {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 8px;
    font-size: 11px;
    line-height: 1.65;
    text-align: left;
    white-space: normal;
    color: #666;
  }

  #site_home {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 16px;
    font-size: clamp(30px, 9vw, 40px);
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  ul#global_navi {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 0;
  }

  ul#global_navi li {
    float: none;
    width: auto;
    margin: 0;
    border: 0;
    border-radius: 5px 5px 0 0;
    background: #292929;
    font-size: 14px;
  }

  ul#global_navi li a,
  ul#global_navi li a:link,
  ul#global_navi li a:visited {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 8px 4px;
  }

  #top_bar {
    height: auto;
    min-height: 12px;
    padding: 5px 16px;
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    background: #eee;
    border-color: #ccc;
  }

  #trunk {
    display: flex;
    flex-direction: column;
  }

  #main {
    margin: 0;
    min-height: 0;
    padding: 24px 16px;
    border-left: 0;
    background: none;
    overflow-wrap: anywhere;
  }

  #main h2 {
    margin: 0 0 20px;
    padding: 0 0 10px;
    border-top: 0;
    border-bottom: 2px solid #333;
    font-size: 24px;
    line-height: 1.5;
  }

  #main h3 {
    padding: 8px 10px;
    font-size: 18px;
    line-height: 1.6;
  }

  .section {
    padding-bottom: 28px;
  }

  .section p,
  .section div,
  .section dl,
  .section ul,
  .section ol,
  .section table,
  .section pre {
    margin-left: 0;
  }

  .lead,
  .lead p,
  .lead ul li {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    font-size: 15px;
    line-height: 1.85;
    text-align: left;
  }

  /* ブログトップにあるインライン指定の固定幅を解除 */
  #main > div[style*="676px"] {
    width: auto !important;
    margin-left: 0 !important;
  }

  #main #news dl {
    margin: 12px 0;
    padding: 12px;
    border-color: #ddd;
    border-radius: 6px;
  }

  #main #news dl dt {
    float: none;
    width: auto;
    font-size: 13px;
    font-weight: bold;
  }

  #main #news dl dd {
    margin-bottom: 12px;
  }

  #main #news dl dd:last-child {
    margin-bottom: 0;
  }

  #main #selector {
    font-size: 14px !important;
  }

  #selector_checkboxes {
    line-height: 2.5;
  }

  #selector_checkboxes input {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
  }

  #selector_buttons {
    line-height: 2.5;
  }

  #selector_buttons select,
  #selector_buttons input {
    box-sizing: border-box;
    min-height: 36px;
    max-width: 100%;
    padding: 4px 6px;
    font-size: 16px;
  }

  #main #stat {
    height: auto;
    min-height: 20px;
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.6;
  }

  #main #feed_display {
    margin: 0;
    padding: 0;
  }

  #main #feed_display li {
    padding: 12px 0;
    border-bottom: 1px solid #e6e6e6;
  }

  #main #feed_display div.date,
  #main #feed_display div.label {
    float: none;
    width: auto;
    text-align: left;
    font-size: 12px;
  }

  #main #feed_display a {
    display: block;
    width: auto;
    margin: 4px 0 0;
    line-height: 1.7;
  }

  .entry {
    margin: 0 0 32px;
    font-family: inherit;
    line-height: 1.9;
    text-align: left;
  }

  .entry h3,
  .entry h4 {
    margin-top: 28px;
  }

  .entry strong {
    font-weight: 700;
  }

  .entry ul > li {
    margin-left: 1.5em;
    list-style: disc;
  }

  .entry ol > li {
    margin-left: 1.5em;
    list-style: decimal;
  }

  .entry a {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  #main img,
  #main video {
    max-width: 100%;
    height: auto;
  }

  #main iframe {
    max-width: 100%;
  }

  #main pre {
    box-sizing: border-box;
    max-width: 100%;
    margin: 16px 0;
    padding: 12px;
    overflow-x: auto;
    white-space: pre;
    overflow-wrap: normal;
    font-size: 13px;
    line-height: 1.65;
  }

  #main table {
    box-sizing: border-box;
    display: block;
    width: auto;
    max-width: 100%;
    margin: 20px 0;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.65;
  }

  #main table th,
  #main table td {
    padding: 10px;
    vertical-align: top;
  }

  /* ブログトップの記事一覧は縦並び */
  #main .lead + table:not(#office_table):not(#career_table),
  #main .lead + table:not(#office_table):not(#career_table) tbody,
  #main .lead + table:not(#office_table):not(#career_table) tr,
  #main .lead + table:not(#office_table):not(#career_table) td {
    display: block;
    width: auto;
    overflow: visible;
  }

  #main .lead + table:not(#office_table):not(#career_table) tr {
    padding: 14px 0;
    border-bottom: 1px solid #ddd;
  }

  #main .lead + table:not(#office_table):not(#career_table) td {
    padding: 0 !important;
  }

  #main .lead + table:not(#office_table):not(#career_table) td:first-child {
    color: #777;
    font-size: 12px;
  }

  #main .lead + table:not(#office_table):not(#career_table) td a {
    display: block;
    padding: 5px 0;
    font-size: 16px;
    line-height: 1.7;
  }

  .post_metadata {
    margin: 28px 0;
    padding-top: 12px;
    font-size: 12px;
    line-height: 1.8;
  }

  div#comments {
    margin: 32px 0 0;
    padding: 20px 0;
  }

  .comment-body {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    margin: 12px 0;
    padding: 12px;
  }

  #comments input,
  #comments textarea {
    box-sizing: border-box;
    max-width: 100%;
    font-size: 16px;
  }

  #comments textarea {
    width: 100%;
  }

  a.more-link {
    width: auto;
    max-width: 100%;
  }

  .paging {
    margin: 24px 0;
    padding: 0;
  }

  .paging a,
  .paging .current {
    display: inline-block;
    margin: 4px;
    padding: 5px 10px;
  }

  /* 絶対配置のカレンダーを外し、ブログメニューを下へ */
  #side_bar {
    position: static;
    height: auto;
    padding: 20px 16px;
    border-top: 1px solid #ddd;
    background: #f5f5f5;
  }

  #side_bar #year,
  #side_bar #month,
  #side_bar #date,
  #side_bar #day {
    display: none !important;
  }

  #side_bar #feed,
  #blog_sidebar {
    position: static;
    width: auto;
  }

  #side_bar #feed {
    margin-bottom: 20px;
  }

  #blog_sidebar h3 {
    width: auto;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: bold;
    border-color: #ccc;
  }

  #blog_sidebar li {
    margin-left: 0;
  }

  #blog_sidebar li.categories > ul,
  #blog_sidebar li.arc_date > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  #blog_sidebar li.categories li,
  #blog_sidebar li.arc_date li {
    font-size: 13px;
  }

  #blog_sidebar a {
    display: inline-block;
    padding: 7px 0;
  }

  #adsense,
  #social_buttons,
  #twitter_link {
    position: static;
    width: auto;
    max-width: 100%;
    margin: 16px 0;
  }

  /* 固定幅の旧広告が本文を圧迫しないようにする */
  #adsense {
    display: none;
  }

  #recent li {
    margin-right: 0;
  }

  #recent #show_all {
    margin-right: 0;
  }

  .adOver {
    padding-right: 0;
  }

  #footer {
    padding: 16px;
    border-color: #ddd;
    background: #fff;
  }

  #copyright {
    padding: 0;
    font-size: 11px;
    line-height: 1.8;
    text-align: center;
  }
}

@media screen and (max-width: 767px) {
  #header {
    display: flex;
    flex-direction: column;
    height: auto !important;
    min-height: 0;
    padding: 16px 16px 0;
  }

  #header h1 {
    position: static !important;
    flex: none;
  }

  #header #site_home {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    float: none !important;
    flex: none;
    box-sizing: border-box;
    width: 100% !important;
    height: auto !important;
    min-height: 56px;
    margin: 8px 0 16px !important;
    padding: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(30px, 9vw, 40px);
    font-weight: bold;
    line-height: 1.4;
    text-indent: 0 !important;
    white-space: nowrap;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  #site_home img {
    display: block;
    max-width: 100%;
    height: auto;
  }

  #header ul#global_navi {
    position: static !important;
    flex: none;
    width: 100%;
    margin-top: 0 !important;
    transform: none !important;
  }
}

/* 採用版：スマホのヘッダーと配色 */
@media screen and (max-width: 767px) {
  html,
  body,
  #container,
  #trunk,
  #main {
    background: #e4eff8 !important;
  }

  #header {
    display: flex !important;
    flex-direction: column;
    height: auto !important;
    min-height: 0;
    padding: 20px 16px 0;
    border-top: 3px solid #222;
    background: linear-gradient(
      to bottom,
      #79a9d2 0,
      #bad4e9 45px,
      #e4eff8 95px
    ) !important;
  }

  #header h1 {
    position: static !important;
    flex: none;
    width: auto !important;
    height: auto !important;
    margin: 0 0 10px;
    color: #777;
    font-size: 11px;
    line-height: 1.7;
    white-space: normal;
    text-align: left;
  }

  #header #site_home {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    float: none !important;
    flex: none;
    box-sizing: border-box;
    width: 100% !important;
    height: 48px !important;
    min-height: 0 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    background: none !important;
    text-indent: 0 !important;
    font-size: 0 !important;
    line-height: 48px !important;
    overflow: visible !important;
    transform: none !important;
    opacity: 1 !important;
  }

  #header #site_home > * {
    display: none !important;
  }

  #header #site_home::before {
    content: "www.Javable.Jp";
    position: static !important;
    display: block;
    width: auto;
    height: auto;
    background: none;
    color: #222;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(30px, 8.5vw, 38px);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 48px;
    text-indent: 0;
  }

  #header #site_home::after {
    content: none !important;
  }

  #header ul#global_navi {
    position: static !important;
    display: grid;
    flex: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0;
    border-top: 1px solid #c4d7e7;
    background: transparent !important;
    transform: none !important;
  }

  #header ul#global_navi li {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
  }

  #header ul#global_navi li a,
  #header ul#global_navi li a:link,
  #header ul#global_navi li a:visited {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 10px 4px;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent !important;
    color: #666;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
  }

  #header ul#global_navi li a[aria-current="page"] {
    border-bottom-color: #007a9e;
    color: #007a9e;
    font-weight: bold;
  }

  #header ul#global_navi li a:focus-visible {
    outline: 2px solid #007a9e;
    outline-offset: -4px;
  }

  #top_bar {
    background: #d8e7f3 !important;
    border-top: 1px solid #c4d7e7;
    border-bottom: 1px solid #c4d7e7;
  }

  #main h2 {
    border-bottom-color: #45647d;
  }

  #main .lead + table:not(#office_table):not(#career_table) tr {
    border-bottom-color: #c4d7e7;
  }

  #side_bar {
    background: #d8e7f3 !important;
  }

  #footer {
    background: #e4eff8 !important;
    border-color: #c4d7e7;
  }
}

/* RSS controls and article list */
@media screen and (max-width: 767px) {
  #main #selector {
    margin: 20px 0;
    padding: 14px;
    border: 1px solid #c4d7e7;
    border-radius: 8px;
    background: rgba(255,255,255,.4);
    font-size: 14px !important;
    color: #45647d !important;
  }

  #main #selector_checkboxes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
  }

  #selector_checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 6px;
    cursor: pointer;
    line-height: 1.4;
  }

  #selector_checkboxes input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #007a9e;
  }

  #main #selector_buttons {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid #c4d7e7;
    line-height: 2;
  }

  #main #selector_buttons select {
    min-height: 44px;
    margin-left: 6px;
    padding: 4px 10px;
    border-radius: 5px;
    background: white;
    font-size: 16px;
  }

  #main #selector_buttons input[type="button"] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 10px 0 0;
    padding: 8px 10px;
    border: 1px solid #9ebbd2;
    border-radius: 5px;
    background: #f5f9fc;
    color: #34536b;
    font-size: 14px;
    white-space: normal;
    cursor: pointer;
  }

  #main #selector_buttons input[type="button"]:last-child {
    background: #007a9e;
    border-color: #007a9e;
    color: white;
    font-weight: bold;
  }

  #main #stat {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    height: auto;
    margin: 0 0 16px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: #45647d;
    font-size: 12px;
    line-height: 1.7;
  }

  #stat small {
    font-size: inherit;
  }

  #main #feed_display {
    margin: 0;
    padding: 0;
  }

  #main #feed_display li {
    margin: 0;
    padding: 16px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #c4d7e7 !important;
    line-height: 1.7;
  }

  #main #feed_display div.date,
  #main #feed_display div.label {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    text-align: left;
    font-size: 12px;
    line-height: 1.6;
  }

  #main #feed_display div.date {
    display: none;
  }

  #main #feed_display .date_top div.date {
    display: block;
    margin-bottom: 6px;
    color: #45647d;
    font-weight: bold;
  }

  #main #feed_display div.label {
    margin-bottom: 4px;
  }

  #main #feed_display a.feed_link {
    display: block;
    width: auto;
    margin: 0;
    font-size: 16px;
    line-height: 1.8;
    overflow-wrap: anywhere;
  }

  #feed_display img.ext {
    margin-right: 5px;
    vertical-align: baseline;
  }
}
