/* --- レイアウトの根幹 --- */

main {
    display: flex;
    /* 横並びにする */
    flex-grow: 1;
    /* ヘッダー以外の残りの高さを占める */
    height: 90vh;
    /* 画面の高さの約85%に固定（スクロールを発生させるため） */
    width: 99%;
    /* 全体の横幅 */
    max-width: 2000px;
    margin: 0 auto;
    padding: 5px;
    overflow: hidden;
    /* main自体はスクロールさせない */
    background-color: transparent;
    gap: 20px;
}

body {
    background-color: #010a13;
    color: #ffffff;
}

img {
    margin-top: 0px;
    margin-bottom: 20px;
}

h1 {
    font-size: 80%;
}

@media screen and (max-width: 600px) {
       
}

details summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
details summary::-webkit-details-marker {
  display: none;
}

/* 開いたときに下2角を角丸なしに */
details[open] summary {
  border-radius: 8px 8px 0 0;
}

/* 丸囲みアイコン */
.icon-circle {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

/* 開いたとき: 背景をつける */
details[open] .icon-circle {
  background: #f0f0f0;
}

/* SVG アイコン */
.icon-circle svg {
  width: 12px;
  height: 12px;
  color: #666;
  transition: transform 0.22s ease;
}

/* 開いたとき: 上向きに回転 */
details[open] .icon-circle svg {
  transform: rotate(180deg);
}

/* コンテンツ */
.content {
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  line-height: 1.6;
}


.feedback-box form {
    display: flex;
    margin-left: 40px;
    gap: 10px;
    align-items: flex-start;
    max-width: 600px;
}

.feedback-box textarea {
    flex: 1;
    height: 30px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
}

.feedback-box button {
    padding: 10px 20px;
    height: 40px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.feedback-box button:hover {
    background-color: #0056b3;
}

/* 親コンテナの設定 */
.machine-grid {
    display: grid;
    /* 1行に3列、等幅(1fr)で配置 */
    grid-template-columns: repeat(3, 1fr);
    gap: 0px;
    /* アイテム間の隙間 */
    width: 100%;
    height: 85vh;
    padding: 0px;
    box-sizing: border-box;
    max-height: calc(100vh - 50px);
    /* 画面高からsummaryの分を引く */
    overflow-y: auto;
    /* 縦に溢れたらスクロールバーを出す */
}

/* 各アイテムの設定 */
.machine-item {
    text-align: center;
    padding: 5px;
    background: #010a13;
}

/* 画像の設定 */
.machine-item img {
    width: 100%;
    /* 親要素(30%幅)いっぱいに広げる */
    height: auto;
    /* アスペクト比を維持 */
    cursor: pointer;
    display: block;
}

/* 機種名のテキスト設定 */
.machine-item p {
    margin: 5px 0;
    font-size: 14px;
    font-weight: bold;
    /* 長い名前がはみ出さないように調整 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trophy {
    margin: auto;
}

.gapo{
    margin-bottom: 2px;
}

ul{
    margin-top: 10px;
    margin-bottom: 0px;
    padding-left: 30px;
}

.html {
    width: 32%;
    min-width: 300px;
    height: 100%;
    overflow-y: auto;
    background-color: #010a13;
    padding: 5px;
    box-sizing: border-box;
    text-align: center;
}

.html2 {
    width: 30%;
    height: 65px;
    margin-right: 8px;
    padding-top: 0px;
    overflow-y: scroll;
    background-color: #1e344b;
    box-sizing: border-box;
    text-align: left;
}

.html3 {
    width: 10%;
    height: 65px;
    margin-right: 20px;
    padding-top: 0px;
    background-image:url("slot_picture/enjoy.png");
    background-size: cover;
    background-color: #000305;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
}
.html4 {
    width: 10%;
    height: 65px;
    margin-right: 20px;
    padding-top: 0px;
    background-image:url("slot_picture/ready.png");
    background-size: cover;
    background-color: #000305;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
}

.s_gapoli {
    display: inline-block;
    cursor: pointer;
    width: 180px;
    height: auto;
    vertical-align: bottom;
}

.v_gapoli {
    display: inline-block;
    cursor: pointer;
    width: 180px;
    height: auto;
    vertical-align: bottom;
}

#right-content {
    flex: 1;
    height: 100%;
    background-color: #010a13;
}

#content-viewer {
    width: 100%;
    height: 100%;
    border: 2px solid #333;
    background-color: transparent;
}

.viewer-wrapper::-webkit-scrollbar {
    width: 8px;

}

.viewer-wrapper::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 4px;
}


/* 右側全体のレイアウト調整 */
.viewer-wrapper {
    width: 100%;
    min-width: 0;
    height: 90vh;
    display: flex;
    flex-direction: column;
    background-color: #010a13;
    overflow: hidden;
}

/* タブが並ぶバーのスタイル */
.tab-bar {
    display: flex;
    background: #1a1a1a;
    overflow-x: auto;
    /* タブが増えたら横スクロール */
    white-space: nowrap;
    border-bottom: 2px solid #010a13;
}

/* 各タブ（ボタン）のスタイル */
.tab {
    padding: 10px 15px;
    background: #2c2c2c;
    color: #bbb;
    cursor: pointer;
    border: 1px solid #333;
    border-bottom: none;
    margin-right: 2px;
    display: flex;
    align-items: center;
    font-size: 13px;
    transition: 0.2s;
    white-space: nowrap;
    user-select: none;
}

/* ホバー時 */
.tab:hover {
    background: #3d3d3d;
    color: #fff;
}

/* 選択中のタブ */
.tab.active {
    background: #010a13;
    color: #00d4ff;
    border-top: 2px solid #00d4ff;
    font-weight: bold;
}

/* 閉じるボタン（×） */
.tab-close {
    margin-left: 8px;
    font-size: 16px;
    color: #888;
}

.tab-close:hover {
    color: #ff4d4d;
}

/* コンテンツエリア */
#tab-content-container {
    flex-grow: 1;
    position: relative;
    width: 100%;
    min-width: 0;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

/* iframeの基本設定 */
.tab-content {
    width: 100%;
    min-width: 100%;
    height: 100%;
    border: none;
    display: none;
}

/* アクティブなiframeだけを表示 */
.tab-content.active {
    display: block;
}

/* iframeの場合、中身のサイトがレスポンシブ対応ならこれで縮小されます */
iframe.tab-content {
    min-width: 0;
    /* flex配置時のはみ出し防止 */
}

/* ===== モーダル ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.is-open {
    display: flex;
    
}

.modal-window {
    position: relative;
    width: min(80vw, 720px);
    max-height: 80vh;
    /* background-image: url("slot_picture/modal.png"); */
    background-size: cover;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

.modal-body {
    padding: 40px 32px 32px;
    overflow-y: auto;   /* 内容が長くてもスクロール可能 */
}

.modal-body h2 {
    margin-top: 0;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .modal-window {
        width: 94vw;
        max-height: 88vh;
    }
    .modal-body {
        padding: 40px 18px 24px;
    }
}

.color{
    color: #ff0000;
}