/*--Base------------------------------------------------------------*/
html,
body {
  width: 100%;
  height: 100%;
}
html {
  height: 100%;
  overflow-y: scroll;
}
/*--Reset-----------------------------------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
a {
  text-decoration: none;
}
img {
  border: none;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}
ul,
ol {
  list-style: none;
}
/*--Text------------------------------------------------------------*/
body {
  background: #a6c202;
  background-image: url(../image/dotted_bg2.png);
  background-repeat: repeat-x;
  background-attachment: fixed;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.4;
  font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ",
    Meiryo, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
  font-feature-settings: "palt";
  color: #333333;
  /* ★固定ヘッダー分の余白を上部に確保 */
  padding-top: 80px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 1em;
}
/*--Link------------------------------------------------------------*/
a,
a:link {
  color: #558800;
  transition: color 0.3s ease;
}
a:visited {
  color: #558800;
}
a:hover,
a:active {
  color: #777777;
}
a:focus {
  outline: none;
}
/*--HTML5-----------------------------------------------------------*/
article,
aside,
details,
footer,
header,
main,
menu,
nav,
section,
summary {
  display: block;
}
article,
section,
.contents {
  width: 100%;
}

/*--------------------------------------------------------------------
★ フルワイド・常時上部固定グローバルヘッダー (#global-header)
--------------------------------------------------------------------*/
#global-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #e2e8f0;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ヘッダー内のロゴ＆タイトル */
#header {
  margin: 0;
}
#header header {
  background: transparent !important;
  backdrop-filter: none;
  border-left: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
#header h1 {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}
#header h1 img {
  display: block !important;
  max-height: 32px !important;
  width: auto !important;
}
#header h2 {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  font-size: 0.85em !important;
  font-weight: 600 !important;
  color: #555555 !important;
  line-height: 1.2 !important;
}

/*--------------------------------------------------------------------
レイアウト全体のラッパー
--------------------------------------------------------------------*/
#wrapper {
  max-width: 1080px;
  margin: 0px auto 40px auto; /* ★ここを 20px から 12px に縮める */
  padding: 0 15px;
  overflow: hidden;
}

/*--------------------------------------------------------------------
フッター（コンテンツ枠と一体化・Worksヘッダー風の黒ベース）
--------------------------------------------------------------------*/
#footer {
  overflow: hidden;
  margin: 0 auto;
}
#footer footer {
  background: #222222 !important;
  color: #ffffff !important;
  border-bottom-left-radius: 12px !important;
  border-bottom-right-radius: 12px !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-left: 24px solid #669900 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 12px 16px !important;
  margin-top: 0 !important;
  text-align: left !important;
  font-size: 0.9em;
  font-weight: 500;
}
#footer p {
  margin: 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
}

/*--------------------------------------------------------------------
メニュー＆コンテンツのラッパー
--------------------------------------------------------------------*/
#main {
  overflow: hidden;
  margin: 0 auto;
}

/*--------------------------------------------------------------------
ハンバーガーメニュー・アイコン（スマホ用デフォルト）
--------------------------------------------------------------------*/
.drawer {
  position: relative;
  display: block;
}

.drawer-hidden {
  display: none;
}
.drawer-open {
  display: flex;
  height: 44px;
  width: 44px;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #dddddd;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  z-index: 1002;
}
.drawer-open span,
.drawer-open span:before,
.drawer-open span:after {
  content: "";
  display: block;
  height: 2px;
  width: 22px;
  border-radius: 2px;
  background: #333;
  transition: 0.3s;
  position: absolute;
}
.drawer-open span:before {
  bottom: 6px;
}
.drawer-open span:after {
  top: 6px;
}
#drawer-check:checked ~ .drawer-open {
  background: #e2e8f0;
  z-index: 1002;
}
#drawer-check:checked ~ .drawer-open span {
  background: rgba(255, 255, 255, 0);
}
#drawer-check:checked ~ .drawer-open span::before {
  bottom: 0;
  transform: rotate(45deg);
}
#drawer-check:checked ~ .drawer-open span::after {
  top: 0;
  transform: rotate(-45deg);
}

/*--------------------------------------------------------------------
メニュー（スマホ用スライドメニュー）
--------------------------------------------------------------------*/
.menu {
  z-index: 1001 !important;
  width: 260px;
  height: 100vh;
  position: fixed;
  overflow-y: auto;
  top: 0;
  left: 100%;
  transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid #dddddd;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: none !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}
.menu h1 {
  margin: 0;
  padding: 20px 16px !important;
  background: #222222 !important;
  color: #ffffff !important;
  border-left: 24px solid #669900 !important;
  font-size: 1.2em !important;
  font-weight: bold;
}
.menu ul {
  margin: 0 !important;
  padding: 4px 0 !important;
  list-style: none;
}
.menu li a {
  margin: 2px 8px !important;
  padding: 6px 10px !important;
  border-left: 4px solid #99cc00;
  border-radius: 3px;
  font-size: 0.9em !important;
  font-weight: 500;
  display: block;
  color: #333333;
  background: #fdfdfd;
  transition: all 0.2s ease;
}
.menu li a:hover {
  color: #ffffff;
  background: #88bb00;
  border-left-color: #333333;
}
.menu li ul {
  padding: 0 0 0 10px !important;
}
.menu li ul li a {
  font-size: 0.85em !important;
  padding: 4px 8px !important;
  border-left-width: 2px;
}

#drawer-check:checked ~ .menu {
  left: calc(100% - 260px);
}

/*--------------------------------------------------------------------
背景のピンボケ＆暗転カバー
--------------------------------------------------------------------*/
.menu-bg-cover {
  position: fixed;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 990;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

body:has(#drawer-check:checked) .menu-bg-cover {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/*--------------------------------------------------------------------
コンテンツ枠（余白をちょうど良い広さに微調整）
--------------------------------------------------------------------*/
.contents {
  z-index: 0;
  overflow: hidden;
  margin: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  padding-bottom: 12px !important; /* ★ここを絞ってフッターとの空間を程よく調整 */
}

.twitter {
  display: none;
}

/*--------------------------------------------------------------------
インフォ・メインヘッダーデザイン
--------------------------------------------------------------------*/
#main header {
  background: #222222 !important;
  color: #ffffff !important;
  border-top-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
  border-left: 24px solid #669900 !important;
  margin: 0 !important;
  padding: 8px 16px !important;
  font-size: 1.5em !important;
  font-weight: bold !important;
}

/* Contactページのトップテキストのヘッダー直下における余白調整 */
.contents article > section > p.contact-top-text {
  margin-top: 16px !important;
}

/* 日付 */
.info_header {
  background: #edf2f7;
  color: #2d3748;
  border-left: 8px solid #558800;
  border-radius: 4px;
  margin: 20px 16px 10px 16px;
  padding: 4px 14px;
  font-size: 1.1em;
  font-weight: bold;
}

/* テキスト・段落・タイトル等へのマージン適用（※liは除外してコンパクトに保つ） */
.contents p,
.contents .info_text,
.contents .info_box,
.contents .info_title,
.contents .info_mark,
.contents .info_mark2,
.contents .info_caution,
.contents .work_list,
#main_window p,
#main_window .info_title,
#main_window .info_mark2 {
  margin-top: 8px !important;    
  margin-bottom: 8px !important; 
  margin-left: 28px !important;
  margin-right: 16px !important;
}

/* リスト（ul, ol, li）は今まで通りの自然な間隔にする */
.contents ul,
.contents ol,
.contents li,
#main_window ul,
#main_window ol,
#main_window li {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 28px !important;
  margin-right: 16px !important;
}

.info_text {
  font-size: 1em;
  line-height: 1.5;
}

.info_title {
  margin-top: 12px;
  margin-bottom: 6px;
  padding: 0 0 0 6px;
  font-weight: bold;
  border-left: 6px solid #666666;
  border-bottom: 1px solid #666666;
}

.info_caution {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
  font-weight: bold;
  color: #e53e3e;
  background: #fff5f5;
  border-left: 6px solid #e53e3e;
  border-radius: 4px;
}

/*--------------------------------------------------------------------
作品歴デザイン
--------------------------------------------------------------------*/
.work_header {
  background: #2d3748;
  color: #ffffff;
  border-left: 24px solid #99cc00;
  border-radius: 6px;
  margin: 24px 16px 12px 16px;
  padding: 10px 16px;
  font-size: 1.15em;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.work_header a {
  color: #99cc00;
  text-decoration: underline;
}

.work_list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid #e2e8f0;
  border-left: 6px solid #cbd5e0;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 14px 16px;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.work_list.clickable {
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
}
.work_list.clickable:hover {
  border-left-color: #88bb00;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.work_pkg {
  flex: 0 0 100px;
  text-align: left;
}
.work_pkg img {
  width: 90px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.work_title {
  flex: 1 1 200px;
  font-weight: bold;
  font-size: 1.05em;
}
.work_title a {
  color: #2b6cb0;
  text-decoration: none !important;
}

html[lang="ja"] .work_list.clickable .work_title[lang="ja"] a::after,
html[lang="ja"] .work_list.clickable .work_title a[lang="ja"]::after,
html[lang="ja"] .work_list.clickable .work_title:not([lang]) a::after,
html[lang="en"] .work_list.clickable .work_title[lang="en"] a::after,
html[lang="en"] .work_list.clickable .work_title a[lang="en"]::after,
html[lang="en"] .work_list.clickable .work_title:not([lang]) a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.work_maker {
  flex: 1 1 220px;
  font-size: 0.9em;
  color: #4a5568;
}

.work_part {
  flex: 1 1 260px;
  font-size: 0.9em;
}

/*担当カテゴリ*/
.mark_dir,
.mark_cmp,
.mark_se,
.mark_dlg,
.mark_ma,
.mark_prg {
  margin: 6px;
  padding: 0 0 0 6px;
}
.mark_dir { border-left: 6px solid #000000; }
.mark_cmp { border-left: 6px solid #ff0000; }
.mark_se { border-left: 6px solid #00ffff; }
.mark_dlg { border-left: 6px solid #00ff00; }
.mark_ma { border-left: 6px solid #f0ad4e; }
.mark_prg { border-left: 6px solid #ffff00; }

.subinfo {
  margin: 6px 0px;
  font-size: 0.8em;
  vertical-align: top;
}

/*--------------------------------------------------------------------
メールフォーム
--------------------------------------------------------------------*/
input.name_form,
input.mail_form,
input.subject_form,
textarea.text_form {
  width: 100%;
  resize: vertical;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  padding: 10px;
  font-size: 1em;
}
input.submit_button {
  width: 140px;
  height: 42px;
  border-radius: 6px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  background: #88bb00;
  color: #fff;
}
input.submit_button:hover {
  background: #75a200;
}

/* メールフォームの余白調整 */
form[name="enquete"] {
  margin-bottom: 0px !important;
}
form[name="enquete"] p:last-child {
  margin-top: 16px !important;
  margin-bottom: 0px !important;
}

/*--------------------------------------------------------------------
About me (profile.html) 等のセクション余白
--------------------------------------------------------------------*/
.contents section {
  padding-bottom: 0px;
}

/*--------------------------------------------------------------------
動画・音声埋め込み表示
--------------------------------------------------------------------*/
.youtube, .niconico, .SoundCloud {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-top: 15px !important;
  margin-bottom: 15px !important;
  margin-left: 28px !important;
  margin-right: 16px !important;
  max-width: 560px !important;
  width: calc(100% - 44px) !important;
  box-sizing: border-box !important;
}

.youtube { position: relative; height: auto !important; }
.youtube iframe { width: 100% !important; height: 315px !important; border: none; display: block; }

.niconico { position: relative; width: 100% !important; max-width: 560px !important; height: 176px !important; }
.niconico iframe { width: 100% !important; height: 100% !important; border: solid 1px #CCC; }

.SoundCloud { position: relative; width: 100% !important; max-width: 560px !important; height: 166px !important; }
.SoundCloud iframe { width: 100% !important; height: 100% !important; }

/* ====================================================================
   PC大画面（幅1100px以上）：ヘッダー内にメニューを横並び常時表示
   ==================================================================== */
@media screen and (min-width: 1100px) {

  .drawer-open,
  .drawer-hidden,
  .menu-bg-cover,
  #drawer-check {
    display: none !important;
  }

  .drawer {
    display: flex !important;
    position: static !important;
  }

  .menu {
    position: static !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    overflow-y: visible !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
  }

  .menu h1 {
    display: none !important;
  }

/* 言語切り替えボタンをヘッダー内にスマートに配置し、一番右へ移動 */
  .language-change {
    margin: 0 !important;
    padding: 2px 6px !important;
    background: #f7fafc;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-size: 0.82em !important;
    order: 2 !important; /* ★タブメニュー（order: 1）よりも後ろ（右側）に配置する */
  }

  /* メインナビゲーションタブの横並び設定 */
  .menu ul.tab {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    order: 1 !important; /* ★タブメニューを先に配置 */
  }

  .menu ul.tab > li {
    position: relative;
  }

  .menu ul.tab > li > a {
    margin: 0 !important;
    padding: 6px 12px !important;
    border-left: none !important;
    border-bottom: 3px solid #669900 !important;
    border-radius: 4px !important;
    background: #f8f9fa !important;
    font-size: 0.9em !important;
    font-weight: bold !important;
    white-space: nowrap;
  }

  .menu ul.tab > li > a:hover {
    background: #669900 !important;
    color: #ffffff !important;
    transform: none !important;
  }

/* Works/all などのドロップダウン（サブメニュー）の設定 */
  .menu ul.tab li ul {
    display: none !important;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    width: 220px;
    
    /* ★画面の縦幅が狭くても絶対に画面内に収まるように動的調整する */
    max-height: calc(100vh - 120px) !important; 
    overflow-y: auto !important; /* はみ出た分はスクロールで全件見られるようにする */
    
    padding: 6px !important;
    z-index: 1010;
  }
    
  .menu ul.tab li:hover ul {
    display: block !important;
  }

  .menu ul.tab li ul li a {
    margin: 2px 0 !important;
    padding: 6px 10px !important;
    border-left: 3px solid #99cc00 !important;
    background: #ffffff !important;
    font-size: 0.85em !important;
    border-radius: 4px !important;
  }

  .menu ul.tab li ul li a:hover {
    background: #88bb00 !important;
    color: #ffffff !important;
  }
}

/*--------------------------------------------------------------------
言語切り替えボタン（スマホ用メニュー内）の余白調整
--------------------------------------------------------------------*/
.menu .language-change {
  margin: 12px 12px 8px 12px !important;
  padding: 8px 12px !important;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

html[lang="ja"] *:is([lang]):not([lang="ja"]),
html[lang="en"] *:is([lang]):not([lang="en"]) {
  display: none !important;
}

/*--------------------------------------------------------------------
News ページングボタン
--------------------------------------------------------------------*/
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 30px 0 10px 0 !important;
  padding: 0 16px;
}

a.news-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px !important;
  background: #f7fafc !important;
  color: #333333 !important;
  border: 1px solid #cbd5e0 !important;
  border-left: 4px solid #669900 !important; /* Worksヘッダーお揃いの緑アクセント */
  border-radius: 6px !important;
  font-size: 0.9em !important;
  font-weight: bold !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease !important;
  margin: 0 !important;
}

a.news-btn:hover {
  background: #669900 !important;
  color: #ffffff !important.
  border-color: #669900 !important;
  border-left-color: #222222 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}