/* ===== 基本 ===== */
body { font-size:10pt; margin:0; padding:0; }
A:link    { text-decoration:none; color:#a09999; }
A:visited { text-decoration:none; color:#a09999; }
A:hover   { text-decoration:underline; color:#ff0000; }

.copyright {
  max-width:760px;
  margin:20px auto 20px 100px;
  padding-left:12px;
  border-left:8px solid #8888cc;
  color:#8888cc;
  font-size:8pt;
  line-height:9pt;
}

/* ===== PC固定ナビ ===== */
#titlebanner {
  width:88px; height:64px; background:#101024;
  left:0; top:0; margin:0; padding:0;
  position:fixed; z-index:999;
}
#hmar {
  height:28px; background:#101024;
  left:0; margin:0 0 0 88px; padding:0;
  position:fixed; top:0; width:100%; z-index:999;
}

/* ===== スマホ固定ナビ ===== */
#spnav {
  position:fixed; top:0; left:0; width:100%;
  background:#101024; padding:4px 10px;
  text-align:left; z-index:9999;
  font-size:11pt; display:none;
  box-sizing:border-box;
}
#spnav a { color:#e0b0b0; margin-left:16px; text-decoration:none; }
#spnav a:hover { text-decoration:underline; }

/* ===== コンテンツ本体 ===== */
#contents_body { margin:32px 0 0 100px; padding:0; }

/* ===== テキストボックス ===== */
#textboxw { max-width:760px; padding:0; background:#ffffff; text-align:center; }
.titlebar {
  box-sizing:border-box; background:#303088; color:#eeeeff;
  font-size:14px; line-height:16px;
  text-align:left; padding:6px 16px; white-space:nowrap;
}
.imagebox { max-width:590px; margin:12px auto; }
.imagebox img { width:100%; display:inline-block; }
.title {color:#404040; font-size:16pt; line-height:20pt;}
.lead {color:#101010; font-size:15pt; line-height:20pt;}
.story_wrap { margin:8px 8px; text-align:center; }
.story_body { display:inline-block; text-align:left; color:#101010; font-size:13pt; line-height:18pt; }


/* ===== サムネイル一覧 ===== */
#piclist { margin-top:32px; float:left; max-width:760px;}
#piclist a img { float:left; margin:10px; width:360px; cursor:pointer; }
#piclist a img:hover { opacity:0.8; }

/* ===== 目次ボックス ===== */
#titlebox {
  max-width:720px; margin-top:20px; margin-left:2%;
  text-align:center; border:1px solid #005500;
}
.story   { font-size:11pt; color:#e8e8e8; font-weight:normal; margin-left:8px; text-align:left; }
.okurimono { font-size:11pt; color:#e8e8e8; font-weight:normal; margin-left:8px; text-align:center; }
.story a:link, .story a:visited { color:#e0b0b0; }
.okurimono a:link, .okurimono a:visited { color:#e0b0b0; }

#clearbox { clear:both; }
#naviwrap { max-width:760px; text-align:center; }
#navi { margin:16px auto; }
#navi img { margin: 0 4px;}

/* ===== ビューア（モーダル） ===== */
#viewer {
  display:none;
  position:fixed; inset:0;
  background:#101024;
  z-index:10000;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
#viewer.open { display:flex; }

#viewer-img-wrap {margin-top:-8px;
  height:84vh;
  max-width:1200px;
  display:flex;
  align-items:center;
  justify-content:center;
}
#viewer-img {
  max-height:84vh;
  max-width:100vw;
  width:auto;
  height:auto;
  cursor:pointer;
  display:block;
}
/* キャプション行：ナビボタンと横並び（旧HTMLのレイアウトに合わせる） */
#viewer-bottom {
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:16px;
  padding:0 32px;
  min-height:48px;
  width:90%;
  max-width:1200px;
  gap:16px;
}
#viewer-btn-row {
  position: fixed;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}
#viewer-caption {
  color:#d0e0ff;
  font-size:12pt;
  line-height:18pt;
  text-align:center;
  flex:1;
}
#viewer-btn-row a { opacity:0.7; }
#viewer-btn-row a:hover { opacity:1; }
#viewer-btn-row a img { width:48px; display:block; }

#viewer-close {
  position:fixed;
  top:8px; right:16px;
  color:#e0b0b0;
  font-size:28px; font-weight:bold;
  cursor:pointer;
  z-index:10001;
  line-height:1;
  text-decoration:none;
}
#viewer-close:hover { color:#fff; }

/* ===== スマホ用レイアウト ===== */
@media screen and (max-width:700px) {

  html:not(.pcmode) body { font-size:12pt; }
  html:not(.pcmode) #titlebanner { display:none; }
  html:not(.pcmode) #hmar { display:none; }
  html:not(.pcmode) #spnav { display:block; }
  html:not(.pcmode) #contents_body { margin:48px 10px 10px 10px; }
  html:not(.pcmode) #links { display:none; }
  html:not(.pcmode) #piclist { float:none; width:100%; }
  html:not(.pcmode) #piclist a { display:block; text-align:center; }
  html:not(.pcmode) #piclist a img {
    float:none; width:94%; max-width:94%; margin:12px auto; display:block;
  }

  html:not(.pcmode) #titlebox { max-width:100%; margin:20px auto; }
  html:not(.pcmode) #naviwrap { max-width:100%; }
  html:not(.pcmode) .copyright {
    margin:20px 8px; padding-left:0; border-left:none;
    font-size:9px; line-height:12px; white-space:nowrap;
  }
html:not(.pcmode) #viewer-bottom {
    flex-direction: column;
    gap: 8px;
  }
  html:not(.pcmode) #viewer-caption {
    order: 1;
    width: 100%;
  }
  html:not(.pcmode) #viewer-btn-row {
    order: 2;
    display: flex;
    justify-content: space-between;
    padding: 0 8%;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* pcmode時 */
  html.pcmode #spnav { display:none; }
  html.pcmode #titlebanner { display:block; }
  html.pcmode #hmar { display:block; }
  html.pcmode #links { display:block; }
  html.pcmode #contents_body { min-width:780px; }
  html.pcmode #piclist a img { float:left; width:360px; max-width:360px; margin:10px; display:inline; }
}