/*
Theme Name: simple-custom-theme
Author: Zin_Higawa
Description: simple site
Version: 1.0
*/
body{
  margin: 5px;
}
.layout-wrapper{
  display: flex;
  width:100%;
}
.right-area{
    width: min(180px, 20%);
    margin-top: 80px;
}
.square-ad-scroll{
  overflow-x: auto;
  white-space: nowrap;
  width: 100%;
}
.square-ad-inner{
  display: inline-flex;
  gap: 0;
  text-align: justify;
}
.square-ad-item {
  display: block;
  flex-shrink: 0;
  width: auto;
  max-width: 400px;
  height: 200px;
  overflow: hidden;
  white-space: normal;
}
.square-ad-item table{
  width: auto !important;
  white-space: pre-wrap;
  height: 100%;
}
.site-container {
  flex: 1;
  max-width: 80%;
  margin: 0 auto;
  padding: 10px;
}

.main-content {
  width: 100%;
}
.ad-area{
  display: flex;
  max-width: 100%;
  justify-content: center;
  border: 1px solid #ccc;
  border-radius: 3px;
  text-align: center;
  flex-direction: column;
  overflow: hidden;
  margin: 5px 5px;
  align-items: center;
}
.ad-area img {
  height: auto;
  width: 100%;
}

.ad-area img[width="1"][height="1"] {
  display: none;
}
.related-scroll-box,
.update-scroll-box {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 10px;
  border: 1px solid #eee;
  border-radius: 4px;
  background-color: #f0f0f0;

}
.related-info-section{
  background-color: #EEEEEE;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 5px 10px 10px 10px;
  margin-top: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.update-info-section {
  background-color: #EEEEEE;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.related-info-section h2,
.update-info-section h2 {
  display: inline-block;
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}
.related-list,
.update-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-list li,
.update-list li{
  padding: 10px;
  border-bottom: 1px solid #eaeaea;
}
.related-list li:list-child,
.update-list li:list-child{
  border-bottom: none;
}
.related-list a,
.update-list a {
  color: #0070aa;
  text-decoration: none;
}
.related-list a:hover,
.update-list a:hover{
  text-decoration: underline;
}
.update-scroll-box::-webkit-scrollbar{
  width: 6px;
}
.update-scroll-box::-webkit-scrollbar-thumb{
  background-color: #ccc;
  border-radius: 3px;
}
.related-date,
.update-date {
  font-size: 0.85rem;
  color: #777;
  margin-right: 12px;
  font-weight: bold;
  white-space: nowrap;
}
/* --- フローティングサイドバー（全画面共通） --- */
.floating-sidebar {
  position: fixed;
  top: 10dvh ;
  right: 0px ;
  width: 300px;
  max-width: 90%;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 5px 0 0 5px;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 999;
  box-sizing: border-box;
  
}
/* JavaScriptで付与されるクラス */
.floating-sidebar.is-active {
  transform: translateX(0%);
}
.sidebar-tab {
  position: absolute;
  left: -70px;
  top: 10px;
  width: 70px;
  height: 70px;
  background: #DDD;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 5px 0 0 5px;
  box-sizing: border-box;
}
.sidebar-tab svg {
  width: 100%;
  height: auto;
  display: block;
}
.sidebar{
  width: 100%;
  overflow-y: auto;
  height: 90dvh;
  margin: 5px;
}
.sidebar li{
  margin: 5px 0;
  padding: 5px 0;
  height: auto;
}
#pwa-install-btn{
  display: flex;
  width: 80%;
  text-align: center;
  justify-content: center;
  padding: 10px 20px;
  margin: 20px auto 20px auto;
  background-color: #0073aa;
  color: #ffffff;
  font-size: 15px;
  font-weight: bold;
  border-radius: 5px;
  border-color: #1083ba;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 83, 170, 0.2);
  transition: all 0.2s ease;
}
.mokuji{
    margin: 5px 0;
    padding: 5px;
    border: 1px solid #888;
    border-radius: 3px;
}
@media (prefers-color-scheme: dark) {
  .floating-sidebar {
    background: #eee;
    border: 1px solid #ccc;
    box-shadow: -2px 2px 10px rgba(200, 200, 200, 0.9);
    color: #333;
  }
  .sidebar-tab {
    border: 1px solid #ccc;
  }
}