h1 {
	width: 800px;
    text-align: center;
    font-size: 1.6em;
	margin: 0 auto;
    margin-bottom: 0.5em;
    color: #364e96;/*文字色*/
    border: solid 3px #364e96;/*線色*/
    padding: 0.5em;/*文字周りの余白*/
    border-radius: 0.5em;/*角丸*/
}

h2 {
	width: 800px;
    text-align: center;
    font-size: 1.4em;
	margin: 0 auto;
    padding: 0.5em;
    background: aliceblue;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.23);
}


@media screen and (max-width: 768px) {
    h1 {
		width: 90%;
        font-size: 1.2em;
    }
    h2 {
		width: 90%;
        font-size: 1.0em;
    }
}

body { 
    font-family: Arial, sans-serif; 
    margin: 1em;
    margin-bottom: 0;
    transition: background 0.3s ease;
}

.sample-table, .result-table {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
    padding: 1.5em;
    margin-top: 1.5em;
    font-size: 0.95em;
    line-height: 1.3;
}

.sample-table {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-table-kousai {
    background: url('image/kousai_back50pct.png') top center/cover no-repeat;
    background-attachment: fixed;
    min-height: 500px;
}
.result-table-oshi {
    background: url('image/oshi_back30pct.png') top center/cover no-repeat;
    background-attachment: fixed;
    min-height: 500px;
}

/* 計算前のページの背景設定（サンプル一覧表以外） */
body:not(.has-result) {
    background: url('image/oshi_back30pct.png') top center/cover no-repeat;
    background-attachment: fixed;
}

body:not(.has-result) h1,
body:not(.has-result) h2,
body:not(.has-result) .information-textarea,
body:not(.has-result) .form-input {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 1em;
    margin-bottom: 1em;
}

/* サンプル一覧表は白背景を保持 */
body:not(.has-result) .sample-table {
    background: #fff;
}

/* 計算後のページでは上半分の背景も計算後の画像にする */
body.has-result {
    background: url('image/oshi_back30pct.png') top center/cover no-repeat;
    background-attachment: fixed;
}

body.has-result h1,
body.has-result h2,
body.has-result .information-textarea,
body.has-result .form-input {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 1em;
    margin-bottom: 1em;
}

.information-textarea {
	width: 800px;
	text-align: left;
	margin: 0 auto;
	/*outline: dashed 1px black;*/
}

.form-input {
	width: 400px;
	text-align: center;
	margin: 0 auto;
    font-size: 1.2em;
	/*outline: dashed 1px black;*/
}

@media screen and (max-width: 768px) {
	.information-textarea {
		width: 100%;
		text-align: left;
		margin: 0 auto;
		/*outline: dashed 1px black;*/
	    font-size: 0.95em;
	}
    .form-input {
		width: 100%;
		text-align: center;
		margin: 0 auto;
		/*outline: dashed 1px black;*/
    }
}


.btn-square-shadow {
  display: inline-block;
  font-size: 0.8em;
  padding: 0.5em 1em;
  text-decoration: none;
  background: #668ad8;/*ボタン色*/
  color: #fff;
  width: 320px;
  height: 60px;
  border-bottom: solid 4px #627295;
  border-radius: 3px;
}
.btn-square-shadow:active {
  /*ボタンを押したとき*/
  -webkit-transform: translateY(4px);
  transform: translateY(4px);/*下に動く*/
  box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.2);/*影を小さく*/
  border-bottom: none;
}
.btn-square-shadow:disabled {
  /*ボタンが無効化されたとき*/
  opacity: 0.6;
  cursor: not-allowed;
  background: #999;
  border-bottom-color: #666;
}
.btn-square-shadow:disabled:active {
  transform: none;
  box-shadow: none;
}

/* 消去ボタンのスタイル */
.clear-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  margin-left: 8px;
  transition: background 0.2s;
}
.clear-btn:hover {
  background: #c82333;
}
.clear-btn:active {
  background: #bd2130;
}


/* テーブルスタイル */
table {
    width: 100%;
    max-width: 900px;
    margin: 1em auto;
    border-collapse: collapse;
    font-size: 0.95em;
}

th, td {
    border: 1px solid #ccc;
    padding: 0.4em 0.6em;
    text-align: center;
}

th {
    background-color: #f8f8f8;
}

.information-info {
    font-size: 0.95em;  /* PCサイズ */
    line-height: 1.3;
    text-align: center;
    margin-top: 1em;
}

@media screen and (max-width: 768px) {
    .information-info {
        font-size: 0.8em;  /* スマホサイズ */
        line-height: 1.2;
    }
}

/* 次回記念日の行 */
tr.highlight {
    background-color: #ffeeba;
    font-weight: bold;
    color: #000;
}

/* スマホ用調整 */
@media screen and (max-width: 768px) {
    .sample-table, .result-table {
        font-size: 0.8em;
        line-height: 1.2;
        padding: 1em;
    }
    table {
        font-size: 0.8em;
        overflow-x: auto;
        display: block;
        max-width: 100%;
        margin: 1em 0;
    }
}

/* フッターのスタイル */
.service-footer {
    background-color: #f0f4f8;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #dae1e8;
    text-align: center;
}

.footer-links {
    display: inline-flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.footer-links a {
    color: #5a6c7d;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #364e96;
    text-decoration: underline;
}

@media screen and (max-width: 768px) {
    .service-footer {
        margin-top: 3rem;
    }

    .footer-links {
        gap: 1rem;
    }

    .footer-links a {
        font-size: 0.85rem;
    }
}

/* ▼ モード別テーマ色 */
:root{ --brand:#6c5ce7; --oshi:#00bcd4; }
body.couple h1{ border-color: var(--brand); color:#364e96; }
body.oshi h1{ border-color: var(--oshi); color:#0b7285; }

/* ▼ モードバー・入力群 */
.modeBar{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:1em auto; width:800px; max-width:100%; }
.modeBarSelect{ background:#ffffff; border:1px solid #8f8500; padding:6px 10px; font-size:16px; }
.pill{ background:#f1e100; border-radius:999px; padding:6px 10px; font-size:16px; }
.nameRow{ width:800px; max-width:100%; margin:0 auto 0.5em; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.nameRow input{ width: 93%; padding:10px; border:1px solid #e5e7eb; border-radius:8px; }
@media screen and (max-width: 768px){ .modeBar,.nameRow{ width:90%; grid-template-columns:1fr; } }

/* ▼ 結果表示 */
.js-result{ text-align:center; font-size:1.4em; margin-top:0.5em; }
.badge{ display:inline-block; padding:4px 8px; border-radius:999px; background:#eef2ff; color:#4f46e5; font-weight:700; font-size:12px; }
body.oshi .badge{ background:#e0f2fe; color:#0284c7; }

/* ▼ シェアボタン（既存の .btn-square-shadow に干渉しない独立クラス） */
.shareBtns{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin:12px auto; width:800px; max-width:100%; }
.shareBtns .btn{ display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:12px; border:0; cursor:pointer; color:#fff; font-weight:600; }
.shareBtns .btn.tw{ background:#1d9bf0; }
.shareBtns .btn.line{ background:#06c755; }
.shareBtns .btn.fb{ background:#1778f2; }
.shareBtns .btn.clip{ background:#374151; }

/* ▼ Recommendation Cards */
.recoWrap{ width:800px; max-width:100%; margin: 1em auto; overflow: hidden; }
.recoGrid{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
@media screen and (max-width: 768px){ .recoGrid{ grid-template-columns:1fr; } }
.recoCard{ display:block; text-decoration:none; border:1px solid #e5e7eb; border-radius:14px; padding:14px; background:#fff; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.recoCard h3{ margin:0 0 .2em; font-size:1.05em; }
.recoCard p{ margin:.2em 0 .6em; font-size:.9em; color:#374151; }
.recoTags{ display:flex; flex-wrap:wrap; gap:6px; }
.recoTag{ font-size:12px; background:#f3f4f6; padding:4px 8px; border-radius:999px; color:#4b5563; }

/* ▼ カテゴリシャッター */
.recommendReason { 
  text-align: center; 
  color: #4b5563; 
  font-size: 0.95em; 
  margin: 20px auto 25px; 
  padding: 16px 24px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 12px;
  max-width: 700px;
  line-height: 1.6;
}

.categoryWrap { 
  margin-top: 20px; 
  padding: 20px;
  background: #f9fafb;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
}

.categoryItem { 
  margin-bottom: 20px; 
  border: 2px solid #e5e7eb; 
  border-radius: 16px; 
  overflow: hidden; 
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s;
}
.categoryItem:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: #d1d5db;
}
.categoryItem:last-child {
  margin-bottom: 0;
}

.categoryHeader { 
  padding: 24px 28px; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  transition: all 0.2s; 
  user-select: none;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
  border-bottom: 2px solid #e5e7eb;
  position: relative;
}
.categoryHeader:hover { 
  background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
}
.categoryHeader.active { 
  background: #fff;
  border-bottom-color: #6366f1;
}
.categoryHeader.active .categoryToggle {
  transform: rotate(180deg);
}

.categoryRank {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 0.85em;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}
.categoryIcon { 
  font-size: 28px; 
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}
.categoryName { 
  flex: 1; 
  font-weight: 700; 
  color: #1f2937; 
  font-size: 1.15em;
  letter-spacing: 0.02em;
}
.categoryToggle { 
  color: #6b7280; 
  font-size: 20px; 
  font-weight: 700;
  transition: transform 0.3s;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
}

.categoryContent { 
  padding: 0 20px 20px; 
  background: #fff; 
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.categoryForm { padding: 16px 0; border-bottom: 1px solid #e5e7eb; margin-bottom: 16px; }
.formRow { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.formRow:last-child { margin-bottom: 0; }
.formRow label { min-width: 80px; color: #6b7280; font-size: 14px; }
.formRow input, .formRow select { flex: 1; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; background: #fff; }

.categoryCards { display: grid; gap: 12px; }
.categoryCards .recoCard { margin: 0; transition: transform 0.2s; }
.categoryCards .recoCard:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.categoryCards .recoCard h3 { color: #1f2937; }
.categoryCards .recoCard p { line-height: 1.4; }

@media screen and (max-width: 768px) {
  .categoryHeader { padding: 12px 16px; }
  .categoryContent { padding: 0 16px 16px; }
  .formRow { flex-direction: column; align-items: flex-start; }
  .formRow label { min-width: auto; }
}
