.clear{
    clear: both;
}

html {
  overflow-y: scroll;
}
body {
    line-height: 1.6;

    font-family: "Segoe UI", "Hiragino Sans", sans-serif;
    background: #f9f9f9;
    margin: 0;
    padding: 20px;
    color: #333;

    padding-top: 48px;
    padding-bottom: 48px;
}

.container {
    max-width: 920px;
    min-height: 900px;
    overflow: visible;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flow-root;
}

#resultsSection {
  min-height: 900px;
}

/* ヘッダ */
#fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 48px;
  min-height: 48px;
  background: #222;
  color: #fff;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px;
  box-sizing: border-box;

  z-index: 1000;
}

#fixed-header button {
  background: #444;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

#fixed-header button:hover {
  background: #666;
}

/* フッタ */
#fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  min-height: 48px;
  background: #222;
  color: #fff;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px;
  box-sizing: border-box;

  z-index: 1000;
}

#fixed-footer button {
  background: #444;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  width: 120px;
  font-weight: bold;
  cursor: pointer;
}

#fixed-footer button:hover {
  background: #666;
}

.title {
    font-size: 1.8rem;
    text-overflow: ellipsis;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

summary{
    text-align: center;
    margin: 10px;
    display: block;
    width: fit-content;
    margin: 0 auto;
}

summary::-webkit-details-marker {
  display: none;
}

/* page 画像 */
.product-image{
    margin-bottom: 20px;
    max-width: 400px;
    text-align: center;
    margin: 0 auto 20px;
}

.product-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sub-image{
    min-height: 400px;
    max-width: 100%;
    text-align: center;
    margin: 0 auto 20px;
}

.sub-image img{
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.price-section {
    text-align: center;
    margin: 20px 0;
}

.price {
    font-size: 1.6rem;
    color: #e63946;
    font-weight: bold;
}

.price-history {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

.description {
    margin: 20px 0;
    font-size: 1rem;
    line-height: 1.8;
}

.description summary{
    max-width: 300px;
}

.link-button{
    text-align: center;
    margin: 80px 0;
    font-size: 1.4rem;
    font-weight: bold;
}

.link-button a{
    color: #0044ff;
}

.link-button2{
    text-align: center;
    margin: 40px;
}

.link-button2 a{
    display: inline-block;
    background: #16a34a;
    padding: 12px 28px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.link-button a:active {
  transform: translateY(1px);
}
.link-button a:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .title {
    font-size: 1.4rem;
    }
    .buy-button a {
    width: 100%;
    }
}


/* page 値段履歴 */
.price-history {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.price-history h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-left: 5px solid #0077cc;
    padding-left: 10px;
}

.price-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.price-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}

.price-list li:last-child {
    border-bottom: none;
}

.date {
    font-size: 0.9rem;
    color: #666;
    flex: 1;
}

.price {
    font-weight: bold;
    color: #e63946;
    flex: 1;
    text-align: center;
}

.diff {
    flex: 1;
    text-align: right;
    font-size: 0.9rem;
}

.diff.up {
    color: #200be0; /* 赤：値上がり */
}

.diff.down {
    color: #d11c1c; /* 緑：値下がり */
}

/* 値上がり・値下がりの色分け */
.up {
    color: #e63946;
}
.down {
    color: #2a9d8f;
}

/* スマホ対応 */
@media (max-width: 500px) {
    .currency-value {
    font-size: 1rem;
    }
}

:root{
--gap: 8px;
--padding-y: 6px;
--padding-x: 12px;
--radius: 999px; /* pill */
--font-size: 14px;
--shadow: 0 1px 2px rgba(0,0,0,0.06);
--muted: #6b7280;
}

/* page tag */

.tag-list{
    margin: 20px;
    margin-bottom: 50px;
    min-height: 200px;
}

@media (max-width: 768px) {
  .tag-list {
    min-height: 600px;
  }
}

.tags {
display: flex;
flex-wrap: wrap;
gap: var(--gap);
align-items: center;
}

.tag {
display: inline-flex;
align-items: center;
text-decoration: none;
padding: var(--padding-y) var(--padding-x);
border-radius: var(--radius);
font-size: var(--font-size);
box-shadow: var(--shadow);
transition: transform .08s ease, box-shadow .12s ease, opacity .12s ease;
white-space: nowrap;
border: 1px solid transparent;
width: 100px;
margin: 2px;
}

.select-btn.active {
  background: lightgreen !important;
  border-color: green;
}

.select-btn{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reset-btn{
    margin-left: 50px;
}

.tag-submit {
    display: block;
    text-align: center;
    margin: 30px 0;
}

.tag-submit button {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background: #0077cc;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.3s;
    cursor: pointer ;
}

.tag:focus { outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.18); }
.tag:hover { transform: translateY(-2px); }
.tag:active { transform: translateY(0); opacity: .95; }

/* color variants */
.tag--primary { background: linear-gradient(180deg,#eef2ff,#e0e7ff); color: #3730a3; border-color: rgba(55,48,163,0.15); }
.tag--success { background: linear-gradient(180deg,#ecfdf5,#d1fae5); color: #065f46; border-color: rgba(6,95,70,0.12); }
.tag--info    { background: linear-gradient(180deg,#eff6ff,#dbf4ff); color: #0b5fff; border-color: rgba(11,95,255,0.12); }
.tag--warning { background: linear-gradient(180deg,#fff7ed,#fff1d6); color: #92400e; border-color: rgba(146,64,14,0.12); }
.tag--danger  { background: linear-gradient(180deg,#fff1f2,#ffe4e6); color: #831843; border-color: rgba(131,24,67,0.12); }

/* small icon (optional) */
.tag .icon{
display:inline-block;
width:18px;height:18px;
flex: 0 0 18px;
text-align:center;
font-size:12px;
line-height:18px;
border-radius:50%;
background: rgba(255,255,255,0.6);
color: inherit;
box-shadow: inset 0 -1px rgba(0,0,0,0.03);
}

/* compact / outline style */
.tag--outline {
background: transparent;
border-color: rgba(0,0,0,0.06);
box-shadow: none;
}

/* responsive: smaller on narrow screens */
@media (max-width:480px){
:root{ --padding-x:10px; --font-size:13px; }
}

.language-change {
    margin: 10px;
}

/* page処理 */

div#pagination{
    background-color: #ffffff;
    text-align: center;
    display: flex;
    justify-content: center;
    height: 50px;
    margin-top: 40px;
}

ul.page{
    display: -webkit-flex;
    display: flex;
    align-items: center;
    list-style: none;
}

li.page2 {
    align-items: center;
    gap: 8px;
    border: 2px solid #eeeeee;
    padding: 8px 14px;
    margin: 40px 40px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    user-select: none;
    background-color: #adcaff;
}

li.page2 a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

/* page処理 -end */

/* page desc2 */
.description2 {
    max-width: 600px;
    min-height: 300px;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 10px;
    background: #fafafa;
    font-family: sans-serif;
    margin: 20px auto;
}

.description2 li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.description2 ul:last-child {
    border-bottom: none;
}

.description2 a{
    margin-right: 10px;
    line-height: 2;
}

.desc2-left {
    flex: 0 0 20%;
    font-weight: bold;
    color: #333;
}

.desc2-right {
    flex: 1;
    color: #555;
}

/* page desc */
  .more-desc {
    display: none; /* 初期は隠す */
  }
  .btn-desc {
    display: block;
    margin: 10px auto;
    padding: 8px 16px;
    background: #0078d7;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }

/* page nedan */
.readmore-btn {
/*    display: inline-block; */
    padding: 10px 20px;
    background: #0044ff;        /* 青ボタン */
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    user-select: none;
    transition: 0.2s;
    font-weight: bold;
}

.readmore-btn:hover {
    background: #0056c7;
}

.readmore-btn::-webkit-details-marker {
    display: none; /* ▸ 矢印を消す */
}

/* 開いた時にボタンの文字を変えたい場合 */
.readmore-box[open] .readmore-btn::after {
    content: "（閉じる）";
    margin-left: 6px;
    font-size: 14px;
    opacity: 0.8;
}

/* page tsuka*/
  .currency-list {
    max-width: 400px;
    margin: auto;
    padding: 0;
    list-style: none;
  }
  .currency-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    margin: 4px 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  .currency-list li span {
    font-weight: bold;
  }
  .more {
    display: none; /* 初期は隠す */
  }
  .toggle-btn {
    display: block;
    margin: 10px auto;
    padding: 8px 16px;
    background: #0078d7;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }

/* page coupon */
  .coupon-list{
    max-width:860px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:var(--gap);
  }

  .coupon{
    background:var(--card);
    border-radius:12px;
    padding:12px;
    display:flex;
    gap:12px;
    align-items:flex-start;
    box-shadow: 0 1px 4px rgba(18,24,40,0.06);
    border:1px solid rgba(16,24,40,0.04);
  }

  /* 左のパーセンテージバッジ */
  .coupon .badge {
    min-width:64px;
    height:64px;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color:white;
    font-weight:800;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    flex-shrink:0;
  }
  .coupon .badge .percent { font-size:18px; line-height:1; }
  .coupon .badge .unit { font-size:12px; opacity:.95; margin-top:2px; }

  /* 通常 */
  .coupon .badge.default { background: linear-gradient(180deg, #3b82f6, #2563eb); }

  /* 特別クーポン */
  .coupon.special .badge { background: linear-gradient(180deg, #fb7185, #e11d48); }

  /* バッジに小さなリボン */
  .coupon .badge::after{
    content:"";
    width:0;
    height:0;
    border-left:8px solid transparent;
    border-right:8px solid transparent;
    border-top:10px solid rgba(0,0,0,0.06);
    transform:translateY(8px);
    opacity:0.5;
  }

  /* メイン内容 */
  .coupon-body{ flex:1; display:flex; flex-direction:column; gap:6px; }
  .coupon-title{ font-size:1rem; font-weight:700; margin:0; display:flex; justify-content:space-between; align-items:center; gap:12px; }
  .coupon-desc{ margin:0; color:var(--muted); font-size:0.95rem; line-height:1.4; }
  .coupon-meta{ display:flex; gap:8px; align-items:center; margin-top:6px; flex-wrap:wrap; }
  .coupon-image img{ width: 60px; height: 90px;}

  /* 縦並び(スマホで見やすく) */
  @media (max-width:600px){
    .coupon{ flex-direction:row; align-items:flex-start; }
    .badge{ min-width:56px; height:56px; }
    .coupon-title{ font-size:0.98rem; }
  }

/* page サークル */
.circle{
    font-size: 1.3rem;
}

.circle-productions{
    min-height: 900px;
}

/* search link */

.results{
    min-height: 900px;
    max-width: 900px;
    margin: auto;
}

#resultsGrid{
    display: grid;
    gap: 16px;
}

.card_main{
    position:relative;
    display:flex;
    gap:12px;
    border:1px solid #ddd;
    padding:10px;

    margin-bottom:10px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    color: #1D00A6;
    text-decoration: none;

    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    transition: transform .15s ease, box-shadow .15s ease;

}

.card{
        display:block;
}

.card::after{
    position:absolute;
    content: "";
    inset:0;
    z-index:2;    
}

.card_main img{
    flex-shrink:0;
    position:relative;
    z-index:1;

    gap:12px;
    border:1px solid #ddd;
    padding:10px;

    max-width: 200px;
    max-height: 150px;
    width: 200px;
    height: 150px;
/*    aspect-ratio: 1 / 1; */
    object-fit: cover;
/*    display: block;    */
}

.card_info{
    flex:1;
    position:relative;
}

.card_title{
    padding: 10px 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.card_tag_list{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    z-index:3;
}

.card_tag{
    position:relative;
    z-index:3;

    padding:4px 10px;
    border:1px solid #ccc;
    border-radius:6px;
    background:#f5f5f5;
    font-size:16px;
    line-height:1.4;
}

.card_tag_list a{
    text-decoration: none;
}

.card_rate{
    margin: 5px;
}

.thumb{
    text-align: center;
}