/* template.css — 共通レイアウト（mobile-first） */

/* ===== Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== Base ===== */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

li {
  list-style: none;
}

/* ===== Header ===== */
.header {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: #333;
  color: white;
  padding: 0;
}

.header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.header-image {
  display: block;
  margin: 5px 10px;
  flex-shrink: 0;
}

.header h1,
.title {
  font-size: 1.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-link {
  font-size: 1.2rem;
  color: white;
  text-decoration: none;
  margin: 0 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-link:hover {
  color: #ccc;
}

.header .link-txt {
  display: none;
}

/* ===== Ads ===== */
#ad_top,
#ad_bottom,
.ad_container {
  margin: 20px auto;
  padding: 10px;
  text-align: center;
}

.adsbygoogle {
  display: block;
}

/* ===== Page layout ===== */
.page-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* ===== Main content (left/center) ===== */
.game-container {
  flex: 1;
  min-width: 0;
  padding: 0;
  margin: 5px;
  text-align: center;
}

/* ===== iframe wrapper ===== */
#box {
  position: relative;
  width: 92vw;
  height: 92vw;
  margin: 10px auto 0;
  overflow: hidden;
}

#box #my-app,
#my-app {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  overflow: hidden;
}

/* スクロール防止用オーバーレイ（サイドスワイプ誤操作対策） */
.scroll-overlay {
  position: absolute;
  top: 0;
  width: 12px;
  height: 100%;
  z-index: 10;
}

.scroll-overlay-left  { left: 0; }
.scroll-overlay-right { right: 0; }

/* ===== Game description ===== */
.game-description {
  margin-top: 16px;
}

.game-description-inner {
  text-align: left;
}

.game-description article {
  margin-bottom: 16px;
}

.game-container h2,
.game-container h3 {
  font-size: 1.2rem;
  margin: 16px auto 8px;
  width: 92vw;
  text-align: left;
  border-left: 4px solid #555;
  padding-left: 8px;
}

.game-container ul,
.game-container p {
  width: 92vw;
  margin: 8px auto;
  text-align: left;
}

.game-container ul {
  padding-left: 1.4em;
}

.game-container ul li {
  list-style-position: outside;
  text-align: left;
  line-height: 1.7;
}

/* ===== Right column ===== */
.right-column {
  flex-basis: 100%;
  background-color: lightgray;
}

.right-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px auto 16px 16px;
}

.right-column-header h2 {
  font-size: 1.2rem;
  border-left: 4px solid #555;
  padding-left: 8px;
}

.right-column-header a {
  display: inline-block;
  padding: 6px 16px;
  font-size: 1rem;
  color: #333;
  background-color: #e8e8e8;
  border: 1px solid #aaa;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 0 #999;
  margin-right: 16px;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.right-column-header a:hover {
  background-color: #d4d4d4;
}

.right-column-header a:active {
  box-shadow: none;
  transform: translateY(2px);
}

/* ===== Thumbnail list ===== */
.thumbnail-list,
#link-list {
  list-style: none;
  padding: 0;
}

.thumbnail-item,
#link-list li a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  margin: 10px;
  text-decoration: none;
  color: black;
  background-color: rgb(230, 250, 250);
}

.thumbnail-item img,
#link-list li a img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  background-color: white;
  vertical-align: middle;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #8a8787;
  border-radius: 8px;
}

.thumbnail-item:hover img,
#link-list li a:hover img {
  transform: scale(1.1);
  box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.5);
}

/* ===== Acknowledgement ===== */
.acknowledgement {
  width: 92vw;
  margin: 15px auto;
  padding: 10px;
  background-color: white;
  border-radius: 8px;
  color: #333;
  text-align: left;
}

.acknowledgement h2,
.acknowledgement h3 {
  color: #333;
  line-height: 1.6;
  font-size: 1.2rem;
  margin: 16px auto 8px;
  text-align: left;
  border-left: 4px solid #555;
  padding-left: 8px;
}

.acknowledgement p {
  text-align: left;
}

/* ===== X シェアボタン ===== */
.share-wrap {
  margin-top: 16px;
  text-align: center;
}

.btn-x-share {
  display: inline-block;
  padding: 10px 20px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 20px;
  transition: opacity 0.2s;
}

.btn-x-share:hover {
  opacity: 0.75;
}

/* ===== Footer ===== */
footer {
  background-color: black;
  color: white;
  text-align: center;
  padding: 16px 0;
}

footer p {
  margin: 6px 0;
}

footer a {
  color: white;
}

/* ===== Utility ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Breakpoint: 510px+ ===== */
@media (min-width: 510px) {
  .header .link-txt {
    display: inline;
  }
}

/* ===== Breakpoint: 768px+ ===== */
@media (min-width: 768px) {
  #box {
    width: 512px;
    height: 512px;
  }

  .game-container h2,
  .game-container h3,
  .game-container ul,
  .game-container p,
  .acknowledgement {
    width: 512px;
  }

  .right-column {
    flex-basis: 30%;
  }

  .right-column .thumbnail-item,
  #link-list li a {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}

/* ===== Breakpoint: 990px+ ===== */
@media (min-width: 990px) {
  .right-column .thumbnail-item,
  #link-list li a {
    flex-direction: row;
    gap: 0.5rem;
  }
}
