/* public/assets/css/style.css */

/* --- デザインシステム変数 --- */
:root {
    --primary-color: #0f5132;
    --primary-light: #d1e7dd;
    --primary-gradient: linear-gradient(135deg, #0f5132 0%, #198754 100%);
    --secondary-color: #ffc107;
    --secondary-light: #fff3cd;
    --text-color: #212529;
    --text-muted: #6c757d;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    --box-shadow-hover: 0 15px 40px rgba(15, 81, 50, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --gold: #d4af37;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
}

/* --- ベースリセット --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: #198754;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- ステマ規制対応（プロモーション表記） --- */
.ste-ma-bar {
    background-color: var(--secondary-light);
    border-bottom: 1px solid #ffeeba;
    padding: 8px 0;
    text-align: center;
    font-size: 13px;
    color: #856404;
    font-weight: 500;
}

/* --- ヘッダー --- */
.main-header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo {
    display: flex;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: var(--primary-color);
}
.logo-icon {
    font-size: 26px;
    margin-right: 8px;
}
.logo-text span {
    color: var(--text-color);
    font-weight: 400;
}
.main-nav a {
    margin-left: 24px;
    font-weight: 500;
    color: var(--text-color);
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

/* --- ヒーローセクション --- */
.hero-section {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 80px 0;
    position: relative;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(15, 81, 50, 0.15);
}
.hero-container {
    max-width: 800px;
    text-align: center;
}
.hero-section h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
}
.hero-lead {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 18px;
}
.hero-note {
    max-width: 720px;
    margin: 0 auto 28px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: var(--border-radius-sm);
    background-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
}
.hero-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.hero-badges .badge {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.badge-icon {
    color: var(--secondary-color);
    margin-right: 4px;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

/* --- カテゴリ（ジャンル）セクション --- */
.categories-section {
    padding: 60px 0;
}
.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 12px auto 0;
    border-radius: 2px;
}
.section-title-left {
    text-align: left;
    margin-bottom: 12px;
}
.section-title-left::after {
    margin-left: 0;
    margin-right: 0;
}
.section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 32px;
}
.section-lead {
    max-width: 760px;
    color: var(--text-muted);
    font-size: 15px;
}
.text-link-strong {
    font-weight: 700;
    white-space: nowrap;
}
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}
.category-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: rgba(15, 81, 50, 0.2);
}
.category-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}
.category-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
}
.category-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    flex-grow: 1;
}
.category-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}
.category-meta strong {
    color: var(--primary-color);
}
.card-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 15px;
}
.card-action .arrow {
    transition: var(--transition);
}
.category-card:hover .card-action .arrow {
    transform: translateX(5px);
}

/* --- トップページ機能説明 --- */
.feature-section {
    padding: 56px 0 24px;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    box-shadow: var(--box-shadow);
}
.feature-card h3 {
    font-size: 17px;
    margin-bottom: 10px;
    color: var(--text-color);
}
.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
}
.feature-card-caution {
    border-color: #ffe08a;
    background-color: #fffdf3;
}

/* --- 特徴（About）セクション --- */
.about-section {
    padding: 40px 0 60px;
}
.about-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 48px;
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
}
.about-card h2 {
    text-align: center;
    font-size: 26px;
    margin-bottom: 40px;
}
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}
.about-item {
    text-align: center;
}
.about-icon {
    font-size: 36px;
    margin-bottom: 16px;
}
.about-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}
.about-item p {
    font-size: 14px;
    color: var(--text-muted);
    text-align: left;
}
.about-footer {
    text-align: center;
    margin-top: 40px;
}

/* --- 共通コンポーネント: ボタン --- */
.btn {
    display: inline-block;
    font-weight: 700;
    text-align: center;
    white-space: normal;
    vertical-align: middle;
    user-select: none;
    border: 2px solid transparent;
    padding: 12px 24px;
    font-size: 15px;
    line-height: 1.5;
    border-radius: 30px;
    transition: var(--transition);
    cursor: pointer;
}
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #198754;
    border-color: #198754;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
}
.btn-secondary {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}
.btn-warning {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #212529;
}
.btn-warning:hover {
    background-color: #e0a800;
    border-color: #e0a800;
}
.btn-block {
    display: block;
    width: 100%;
}
.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}
.btn-disabled,
.btn-disabled:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.82;
    box-shadow: none;
}
.btn-light {
    background-color: #ffffff;
    color: var(--primary-color);
    border-color: #ffffff;
}
.btn-light:hover {
    background-color: var(--secondary-light);
    border-color: var(--secondary-light);
    color: var(--primary-color);
}
.btn-ghost-light {
    background-color: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.75);
}
.btn-ghost-light:hover {
    background-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

/* --- 免責事項・更新情報 --- */
.site-meta-section, .compare-footer-info {
    padding: 40px 0;
}
.meta-box, .update-info-box {
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    font-size: 13px;
    color: var(--text-muted);
    border-left: 4px solid var(--primary-color);
}
.meta-box p, .update-info-box p {
    margin-bottom: 8px;
}
.meta-box p:last-child, .update-info-box p:last-child {
    margin-bottom: 0;
}

/* --- カテゴリ（ジャンル別比較）ページレイアウト --- */
.category-header-sec {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0;
}
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.breadcrumb a {
    color: var(--text-muted);
}
.breadcrumb a:hover {
    color: var(--primary-color);
}
.category-header-sec h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}
.category-summary {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 800px;
}

.compare-container {
    padding-top: 40px;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.info-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
}
.info-box h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-color);
}
.info-box p, .info-box ul {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.info-box ul {
    padding-left: 20px;
}
.info-box li {
    margin-bottom: 4px;
}
.warning-text {
    font-size: 12px;
    color: #dc3545 !important;
}
.guide-box,
.notice-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    margin-bottom: 28px;
}
.guide-box {
    border-left: 4px solid var(--primary-color);
}
.notice-box {
    background-color: #fffdf3;
    border-color: #ffe08a;
}
.guide-box h2,
.notice-box h3,
.guide-box h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary-color);
}
.guide-box p,
.notice-box p {
    color: var(--text-muted);
    font-size: 14px;
}
.check-list {
    list-style: none;
    margin-top: 14px;
}
.check-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: #495057;
    font-size: 14px;
}
.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: 700;
}
.ranking-guide-box {
    margin-bottom: 32px;
}

/* --- CSS タブコントロール --- */
.tab-input {
    display: none;
}
.tab-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.tab-button {
    flex: 1;
    min-width: 200px;
    padding: 16px 24px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
    white-space: nowrap;
}
.tab-button span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}
.tab-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

/* タブのアクティブ時の表示制御 */
#tab_cheap:checked ~ .tab-buttons label[for="tab_cheap"] {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(15, 81, 50, 0.2);
}
#tab_cheap:checked ~ .tab-buttons label[for="tab_cheap"] span {
    color: rgba(255, 255, 255, 0.82);
}
#tab_cheap:checked ~ .tab-content.content-cheap {
    display: block;
}

#tab_review:checked ~ .tab-buttons label[for="tab_review"] {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(15, 81, 50, 0.2);
}
#tab_review:checked ~ .tab-buttons label[for="tab_review"] span {
    color: rgba(255, 255, 255, 0.82);
}
#tab_review:checked ~ .tab-content.content-review {
    display: block;
}

#tab_postage:checked ~ .tab-buttons label[for="tab_postage"] {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(15, 81, 50, 0.2);
}
#tab_postage:checked ~ .tab-buttons label[for="tab_postage"] span {
    color: rgba(255, 255, 255, 0.82);
}
#tab_postage:checked ~ .tab-content.content-postage {
    display: block;
}

#tab_attention:checked ~ .tab-buttons label[for="tab_attention"] {
    background-color: #856404;
    color: white;
    border-color: #856404;
    box-shadow: 0 4px 15px rgba(133, 100, 4, 0.18);
}
#tab_attention:checked ~ .tab-buttons label[for="tab_attention"] span {
    color: rgba(255, 255, 255, 0.82);
}
#tab_attention:checked ~ .tab-content.content-attention {
    display: block;
}

.sub-section-title {
    font-size: 20px;
    margin-bottom: 24px;
}
.tab-notice {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 商品リスト・商品カードデザイン --- */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.item-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}
.item-card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateX(4px);
    border-color: rgba(15, 81, 50, 0.15);
}

/* ランキングバッジ */
.rank-badge, .rank-badge-review {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--text-muted);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    font-size: 16px;
    z-index: 10;
}
.rank-1 .rank-badge, .rank-1 .rank-badge-review { background-color: var(--gold); }
.rank-2 .rank-badge, .rank-2 .rank-badge-review { background-color: var(--silver); }
.rank-3 .rank-badge, .rank-3 .rank-badge-review { background-color: var(--bronze); }

.postage-warning-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #dc3545;
    color: white;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    z-index: 10;
}

.attention-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #856404;
    color: white;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    z-index: 10;
}

.item-image-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background-color: #ffffff;
    margin-right: 24px;
}
.item-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-details {
    flex-grow: 1;
    margin-right: 24px;
}
.shop-badge {
    font-size: 11px;
    background-color: #e9ecef;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    margin-bottom: 8px;
    display: inline-block;
}
.item-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}
.item-title a {
    color: var(--text-color);
}
.item-title a:hover {
    color: var(--primary-color);
}

.item-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}
.stars {
    color: var(--secondary-color);
    letter-spacing: 0;
}
.rating-num {
    font-weight: 700;
    color: var(--text-color);
}
.review-count {
    color: var(--text-muted);
}

.price-math {
    font-size: 13px;
    color: var(--text-muted);
    background-color: #f1f3f5;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    display: inline-block;
}
.price-math span {
    font-weight: 700;
    color: var(--primary-color);
}

.item-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 10px;
}
.trait-badge {
    display: inline-block;
    background-color: #f1f3f5;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 3px 9px;
    color: #495057;
    font-size: 11px;
    font-weight: 700;
}
.trait-size {
    background-color: #e8f5e9;
    border-color: #cfe8d8;
    color: var(--primary-color);
}

.item-price-info {
    font-size: 14px;
}
.price-val {
    color: #dc3545;
    font-size: 16px;
}

.item-action {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.unit-price-box {
    text-align: center;
    background-color: #e8f5e9;
    border-radius: var(--border-radius-sm);
    padding: 12px;
}
.unit-price-box-attention {
    background-color: #fff9db;
    border: 1px solid #ffe08a;
}
.item-card-attention {
    border-color: #ffe08a;
    background-color: #fffdf3;
}
.unit-price-label {
    display: block;
    font-size: 11px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 2px;
}
.unit-price-val {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 26px;
    color: var(--primary-color);
}
.unit-price-sub {
    font-size: 12px;
    color: var(--text-muted);
}
.btn-sub {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,0.8);
}
.detail-link {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

/* --- 商品詳細補助ページ (`items/[id].html`) --- */
.item-detail-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0;
}
.item-detail-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.item-detail-header .header-lead {
    color: var(--text-muted);
    font-size: 15px;
}
.item-detail-header .header-note {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 860px;
}

.item-detail-container {
    padding-top: 40px;
    padding-bottom: 60px;
}
.item-grid-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}
.detail-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    box-shadow: var(--box-shadow);
}
.detail-image-box {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: #ffffff;
    margin-bottom: 24px;
    padding: 20px;
}
.detail-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.detail-meta-box {
    display: flex;
    flex-direction: column;
}
.shop-name-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.shop-name-val {
    font-size: 16px;
    margin-bottom: 20px;
}
.item-price-val {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    color: #dc3545;
    margin-bottom: 20px;
}

.postage-warning-alert {
    background-color: #fce8e6;
    border: 1px solid #f5c2c7;
    border-radius: var(--border-radius-sm);
    padding: 16px;
    color: #c02b0a;
}
.postage-warning-alert p {
    font-size: 13px;
    margin-top: 4px;
}
.postage-success-alert {
    background-color: #e6f4ea;
    border: 1px solid #a3cfbb;
    color: #137333;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    text-align: center;
}

.calc-main-card h2 {
    font-size: 20px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 12px;
}
.calc-price-display {
    text-align: center;
    background-color: #e8f5e9;
    border-radius: var(--border-radius-md);
    padding: 32px;
    margin-bottom: 32px;
}
.calc-price-label {
    display: block;
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 8px;
}
.calc-price-num {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 48px;
    color: var(--primary-color);
}
.calc-price-unit {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 700;
}

.formula-box {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    margin-bottom: 32px;
}
.formula-box h3 {
    font-size: 15px;
    margin-bottom: 20px;
    color: var(--primary-color);
}
.calc-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.breakdown-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 14px;
}
.breakdown-label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 6px;
}
.breakdown-item strong {
    display: block;
    font-size: 16px;
    color: var(--text-color);
}
.breakdown-item small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 11px;
}
.formula-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}
.formula-part {
    text-align: center;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px 24px;
    min-width: 140px;
}
.part-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.part-val {
    font-weight: 700;
    font-size: 16px;
}
.formula-operator {
    font-size: 28px;
    font-weight: 300;
    color: var(--text-muted);
}

.ai-extraction-details {
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
}
.ai-extraction-details h4 {
    font-size: 13px;
    margin-bottom: 12px;
}
.ai-extraction-details ul {
    list-style: none;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.ai-extraction-details li {
    font-size: 13px;
    background-color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}
.confidence-badge {
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
}
.confidence-badge.high { background-color: #e6f4ea; color: #137333; }
.confidence-badge.medium { background-color: #fef7e0; color: #b06000; }
.confidence-badge.low { background-color: #fce8e6; color: #c02b0a; }

.ai-disclaimer {
    font-size: 11px;
    color: var(--text-muted);
}

.purchase-decision-box {
    background-color: #fff9db;
    border: 1px solid #ffe3e3;
    border-radius: var(--border-radius-sm);
    padding: 24px;
    margin-top: 24px;
}
.purchase-decision-box h3 {
    font-size: 16px;
    margin-bottom: 8px;
}
.purchase-decision-box p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.r-giant-btn span {
    display: block;
    font-size: 12px;
    font-weight: 400;
    margin-top: 2px;
}
.back-link-box {
    margin-top: 18px;
}

.item-detail-footer, .guide-container {
    margin-top: 40px;
}
.detail-meta-footer {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* --- 解説（ガイド）ページレイアウト --- */
.guide-header {
    background: var(--primary-gradient);
    color: white;
    padding: 60px 0;
    text-align: center;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}
.guide-header h1 {
    font-size: 32px;
    margin-bottom: 12px;
}
.guide-header .lead {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.guide-content-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 48px;
    box-shadow: var(--box-shadow);
    max-width: 860px;
    margin: 0 auto 60px;
}
.guide-section {
    margin-bottom: 48px;
}
.guide-section:last-child {
    margin-bottom: 0;
}
.guide-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-left: 5px solid var(--primary-color);
    padding-left: 12px;
}
.guide-section p {
    font-size: 15px;
    margin-bottom: 16px;
    color: #495057;
}
.reason-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}
.reason-card {
    background-color: #f8f9fa;
    border-radius: var(--border-radius-sm);
    padding: 24px;
    border: 1px solid var(--border-color);
}
.reason-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-color);
}
.reason-card p {
    font-size: 14px;
    margin-bottom: 0;
}
.purchase-check-list {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 20px 20px 12px;
}
.caution-box {
    background-color: #fff9db;
    border: 1px solid #ffeeba;
    border-radius: var(--border-radius-sm);
    padding: 24px;
    margin-bottom: 24px;
}
.caution-box h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #856404;
}
.caution-box p {
    font-size: 14px;
    margin-bottom: 0;
    color: #664d03;
}
.caution-box p + p {
    margin-top: 8px;
}
.final-check-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.final-check-grid div {
    background-color: #eef7f1;
    border: 1px solid #cfe8d8;
    border-radius: var(--border-radius-sm);
    padding: 12px;
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
}
.guide-final-note {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
}

/* --- フッター --- */
.main-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 40px;
    margin-top: 80px;
}
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}
.footer-info h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 16px;
}
.footer-info p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.footer-contact {
    font-weight: 700;
}
.disclaimer {
    font-size: 12px !important;
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: var(--border-radius-sm);
}
.footer-links h4 {
    font-size: 15px;
    margin-bottom: 16px;
}
.footer-links ul {
    list-style: none;
}
.footer-links li {
    margin-bottom: 8px;
}
.footer-links a {
    font-size: 14px;
    color: var(--text-muted);
}
.footer-links a:hover {
    color: var(--primary-color);
}
.footer-credits {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.copyright {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- レスポンシブ対応 --- */
@media (max-width: 992px) {
    .item-grid-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        height: auto;
        padding: 16px 0;
    }
    .main-nav {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .main-nav a {
        margin: 0 12px;
    }
    .hero-section h1 {
        font-size: 28px;
    }
    .hero-lead {
        font-size: 15px;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .section-heading-row {
        display: block;
    }
    .section-title-left {
        text-align: center;
    }
    .section-title-left::after {
        margin-left: auto;
        margin-right: auto;
    }
    .section-lead {
        text-align: left;
        margin-bottom: 16px;
    }
    .text-link-strong {
        display: inline-block;
        white-space: normal;
    }
    .categories-grid {
        grid-template-columns: 1fr;
    }
    .about-card {
        padding: 24px;
    }
    .item-card {
        flex-direction: column;
        align-items: stretch;
    }
    .item-image-wrapper {
        margin: 0 auto 20px;
    }
    .item-details {
        margin-right: 0;
        margin-bottom: 20px;
    }
    .item-action {
        width: 100%;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .calc-breakdown-grid,
    .final-check-grid {
        grid-template-columns: 1fr;
    }
    .formula-flex {
        flex-direction: column;
        gap: 12px;
    }
    .tab-button {
        white-space: normal;
    }
}
