/* ./style.css ver.1.1.2 最新 */
/* =========================================
   Theme Variables（色だけを集中管理）
========================================= */
:root {
  --bg: #ffffff;
  --text: #222;
  --header-border: #eee;
  
  --section-bg: #ffffff;
  --section-shadow: rgba(0, 0, 0, .05);

  --input-bg: #ffffff;
  --input-border: #ddd;

  --icon-bg: #f5f5f5;

  --assistant-bg: #ffffff;
  --assistant-border: #2bb7ff;
}

/* ===== Dark Mode ===== */
.dark {
  --bg: #111;
  --text: #eaeaea;
  --header-border: #444;

  --section-bg: #1a1a1a;
  --section-shadow: rgba(0, 0, 0, .4);

  --input-bg: #222;
  --input-border: #555;

  --icon-bg: #2a2a2a;

  --assistant-bg: #111;
  --assistant-border: #67c8ff;
}


/* =========================================
   Base
========================================= */
html, body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: "Helvetica","Arial","YuGothic",sans-serif;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

.center {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

* {
  touch-action: manipulation;
}

/* =========================================
   Layout
========================================= */
.main {
  width: 80%;
  max-width: 500px;
  margin: 0 auto;
  padding-top: 16px;
}

/* =========================================
   Title
========================================= */
h2 {
  text-align: center;
  margin-top: 24px;
  font-weight: 600;
  font-size: 20px;
  display: block;
  white-space: pre-line;
}
body {
  font-family: sans-serif;
  margin: 0;
  
}

.back-btn {
  font-size: 22px;
  cursor: pointer;
}

.machine-name {
  font-size: 18px;
  font-weight: bold;
}

.counter-area {
  margin-top: 10px;
}

.counter-block {
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.counter-block .label {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
}

.count-btn {
  width: 100%;
  padding: 16px 0;
  font-size: 22px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

.grape .count-btn { background: #5cc16f; color: #fff; }
.big   .count-btn { background: #d83d3d; color: #fff; }
.reg   .count-btn { background: #3d7ad8; color: #fff; }

.bonus-row {
  display: flex;
  gap: 12px;
   margin-top: 12px;
}

.counter-block.big,
.counter-block.reg {
  flex: 1;          /* 横幅を均等に広げる */
  max-width: none;  /* 変な制限があれば無効化 */
}

.result-area {
  margin-top: 20px;
  font-size: 15px;
}

.result {
  margin-bottom: 6px;
}

.reset { background: #ddd; }
.analyze { background: #37b0ff; color: #fff; }

.games-input {
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  font-size: 16px;
}

.games-input input {
  width: 100px;
  padding: 6px;
  font-size: 18px;
  margin-left: 8px;
}

.search-box {
  margin: 12px 0;
}

.search-box input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.machine-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.machine-card {
  padding: 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  cursor: pointer;
}

.machine-name {
  font-size: 16px;
  font-weight: bold;
}

.footer {
  margin-top: 20px;
  text-align: center;
}

.free-link {
  font-size: 26px;
  color: #67c8ff;
  text-decoration: none;
}
/* ▼ フッター（固定トリガー） */
#kachiFooter {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 46px;
   background: var(--bg);
  border-top: 0.5px solid #67c8ff;
  text-align: center;
  line-height: 46px;
  font-size: 16px;
  z-index: 50;
  cursor: pointer;
  user-select: none;
   color: #67c8ff;
}

/* ▼ ボトムシート本体 */
#sheet {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  max-height: 75vh;
   background: var(--bg);
  border-radius: 20px 20px 0 0;  /* ← 四隅統一 */
  overflow: hidden;             /* ← 角丸を正しく見せる */
  box-shadow: 0 -4px 18px rgba(0,0,0,0.2);

  transform: translateY(100%);
  transition: transform 0.35s ease;

  z-index: 100;
  text-align: center;
  display: flex;
  flex-direction: column;       /* ← 下にボタン固定のため */
}

/* 出現 */
#sheet.active {
  transform: translateY(0);
}

/* ▼ 上のグレーつまみ */
#sheetHandle {
  width: 46px;
  height: 5px;
  border-radius: 999px;
  margin: 12px auto;
}

/* ▼ 内容エリア（スクロール可能） */
.sheet-content {
  padding: 0 22px 20px;
  overflow-y: auto;
  flex: 1;                    /* ← ボタン以外がスクロール領域 */
}

/* ▼ トップの設定 */
.sheet-top {
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 18px;
}

/* ▼ 設定一覧 */
.sheet-list {
  font-size: 18px;
  line-height: 2;
}
.sheet-list .best {
  font-weight: 700;
}

/* ▼ 閉じるボタン（完全に最下部へ） */
.close-btn {
  width: 100%;
  padding: 15px 0; 
  border: none;        /* ← 下線（黒線）を完全に削除 */
  border-radius: 0 0 20px 20px;
  font-size: 16px;
   background: var(--bg);
   color: #67c8ff;
}

.header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--header-border);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit; /* ← テキスト色をデザインに合わせる */
}

.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-size: 22px;
  font-weight: bold;
  line-height: 1;
  position: relative;
  top: 1px;
}

.switch {
  font-size: 24px;
  cursor: pointer;
}
.counter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

/* 色設定 */
.counter-block.grape .count-btn {
  background: #4CAF50; /* 緑 */
   color: #fff;
   font-weight: 700;
}
.counter-block.cherry .count-btn {
  background: #E53935; /* 赤 */
   color: #fff;
   font-weight: 700;
}
.counter-block.watermelon .count-btn {
  background: #1E88E5; /* 青 */
   color: #fff;
   font-weight: 700;
}
.counter-block.special .count-btn {
  background: var(--text); /* 白 */
   color: var(--bg);
   font-weight: 700;
}
.counter-block.big .count-btn {
  background: #FFA93A; /* orange */
  color: #fff;
   font-weight: 700;
}
.counter-block.reg .count-btn {
  background: #8E24AA; /* 紫 */
  color: #fff;
   font-weight: 700; 
}

