:root {
    --primary: #FF6B00; --primary-hover: #E05500; --primary-light: rgba(255, 107, 0, 0.1);
    --secondary: #1B2A4A; --secondary-hover: #121D36;
    --bg-body: #F8F9FA; --bg-card: #FFFFFF; --bg-glass: rgba(255, 255, 255, 0.9);
    --text-main: #212529; --text-muted: #6C757D;
    --border-color: #E9ECEF; --border-focus: #FF6B00;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05); --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
    --radius-md: 12px; --radius-lg: 20px; --radius-full: 999px;
    --accent-green: #20C997; --accent-red: #FA5252;
}
[data-theme="dark"] {
    --bg-body: #121212; --bg-card: #1E1E1E; --bg-glass: rgba(30, 30, 30, 0.9);
    --text-main: #E9ECEF; --text-muted: #ADB5BD;
    --border-color: #2B2B2B; --border-focus: #FF6B00;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans JP', sans-serif; background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; transition: background-color 0.3s, color 0.3s; }
h1, h2, h3 { font-family: 'Noto Sans JP', sans-serif; font-weight: 800; line-height: 1.3; }

.navbar-custom { position: fixed; top: 0; left: 0; right: 0; background: var(--bg-card); z-index: 1000; border-bottom: 1px solid var(--border-color); padding: 12px 5%; display: flex; justify-content: space-between; align-items: center; }
.nav-logo-group { display: flex; flex-direction: column; }
.nav-logo-text { color: var(--primary); font-weight: 900; font-size: 1.4rem; line-height: 1; text-decoration: none; font-family: 'Outfit', sans-serif;}
.nav-logo-sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; font-weight: 600;}
.nav-right-btn { background: var(--primary); color: #fff; padding: 8px 16px; border-radius: 8px; font-weight: bold; text-decoration: none; font-size: 0.9rem; }
.theme-toggle { background: var(--bg-body); border: 1px solid var(--border-color); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold; color: var(--text-muted); }

.hero-wrapper { position: relative; width: 100%; height: 80vh; min-height: 550px; background-image: url('../images/hero_handsome_workers.png'); background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 80px 5% 40px; margin-bottom: 20px; }
.hero-gradient { position: absolute; bottom: 0; left: 0; right: 0; height: 150px; background: linear-gradient(to bottom, transparent, var(--bg-body)); pointer-events: none; }
.hero-title-box {
    /* 背景を透明にする */
    background: transparent; 
    display: inline-block;
    margin-bottom: 8px;
    border-radius: 4px;
}

/* hero-title-box 内の見出し（h1, h2）に対して縁取りを適用 */
.hero-title-box h1, 
.hero-title-box h2 {
    color:  #ffffff;             /* 文字の中身を透明にする（中抜き） */
    -webkit-text-stroke: 0px #ffffff; /* 線の太さと色（白）を指定 */
    /* もし中身を透明にせず、文字色を維持したまま縁取りしたい場合は、
       color: #ffffff; など好みの色を指定してください。
    */
    margin: 0;                       /* 余計な余白をリセット */
    line-height: 1.2;
}        .hero-title-box h1, .hero-title-box h2 { color: #ffffff; font-weight: 900; margin: 0; line-height: 1.2; }
.hero-title-box.small { padding: 10px 25px; }
.hero-title-box.small h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
.hero-title-box.large { padding: 15px 35px; }
.hero-title-box.large h1 { font-size: clamp(1.6rem, 5vw, 2.8rem); }
.hero-subtext { color: #ffffff; text-shadow: 0 2px 5px rgba(0,0,0,0.8); font-weight: 600; margin: 25px auto 35px; font-size: clamp(0.95rem, 2.5vw, 1.1rem); line-height: 1.6; max-width: 600px; z-index: 2; }
.hero-btn { background: #E65100; color: #fff; padding: 16px 45px; font-size: 1.2rem; font-weight: bold; border-radius: 50px; text-decoration: none; box-shadow: 0 4px 15px rgba(230, 81, 0, 0.4); z-index: 2; transition: transform 0.2s; }
.hero-btn:hover { transform: translateY(-3px); }
.hero-scroll { position: absolute; bottom: 15px; color: var(--secondary); font-weight: 800; font-size: 0.9rem; z-index: 2; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 5%; }
.card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 30px; margin-bottom: 30px; box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
.mode-tabs { display: flex; background: var(--border-color); border-radius: var(--radius-full); padding: 5px; margin-bottom: 30px; position: relative; }
.mode-tab { flex: 1; text-align: center; padding: 12px 20px; border-radius: var(--radius-full); cursor: pointer; font-weight: 700; color: var(--text-muted); transition: all 0.3s; z-index: 1; }
.mode-tab.active { color: #fff; background: var(--primary); box-shadow: 0 4px 10px rgba(255, 107, 0, 0.3); }
.mode-panel { display: none; }
.mode-panel.active { display: block; }
.upload-area { border: 2px dashed var(--border-focus); border-radius: var(--radius-lg); padding: 40px 20px; text-align: center; cursor: pointer; background: var(--primary-light); }
.upload-text { font-weight: 700; font-size: 1.2rem; margin-bottom: 10px; color: var(--secondary); }
.upload-subtext { color: var(--text-muted); font-size: 0.9rem; }
.upload-buttons { display: flex; gap: 15px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.btn { padding: 14px 28px; border-radius: var(--radius-full); font-weight: 700; cursor: pointer; border: none; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: #fff; box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3); }
.btn-secondary { background: var(--secondary); color: #fff; box-shadow: 0 4px 15px rgba(27, 42, 74, 0.3); }
.btn-outline { background: transparent; border: 2px solid var(--border-color); color: var(--text-main); }
.preview-area { margin-top: 30px; display: none; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 15px; margin-bottom: 20px; }
.preview-item { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 1; border: 2px solid var(--border-color); }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,0.6); color: white; border: none; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.loading-area { text-align: center; padding: 40px; display: none; }
.spinner { width: 50px; height: 50px; border: 4px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.manual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; margin-bottom: 30px; }
.manual-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; background: var(--bg-body); border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.manual-item.has-count { border-color: var(--primary); background: var(--primary-light); }
.manual-item-left { display: flex; flex-direction: column; }
.manual-item-name { font-weight: 700; font-size: 1.05rem; }
.manual-item-vol { font-size: 0.8rem; color: var(--text-muted); }
.manual-item-count { display: flex; align-items: center; gap: 12px; }
.manual-item-count button { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--bg-card); box-shadow: var(--shadow-sm); cursor: pointer; font-size: 1.2rem; font-weight: bold; color: var(--secondary); }
.manual-item-count span { font-weight: 800; font-size: 1.1rem; width: 20px; text-align: center; }
.result-section { display: none; margin-top: 40px; }
.result-header { margin-bottom: 20px; font-size: 1.5rem; color: var(--secondary); border-bottom: 2px solid var(--border-color); padding-bottom: 10px; }
.items-flex { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.item-tag { background: var(--primary-light); color: var(--primary); padding: 8px 16px; border-radius: var(--radius-full); font-weight: 700; font-size: 0.95rem; border: 1px solid rgba(255,107,0,0.2); }
.item-vol { font-size: 0.8rem; opacity: 0.8; font-weight: normal; margin-left: 4px; }
.total-vol-box { background: var(--secondary); color: #fff; padding: 20px; border-radius: var(--radius-md); text-align: center; margin-bottom: 30px; }
.total-vol-box p { font-size: 0.9rem; opacity: 0.8; margin-bottom: 5px; }
.total-vol-box h3 { font-size: 2.5rem; color: var(--primary); }
.truck-option { background: var(--bg-body); border: 2px solid var(--border-color); border-radius: var(--radius-md); padding: 20px; margin-bottom: 15px; }
.truck-name { font-size: 1.3rem; font-weight: 800; color: var(--secondary); margin-bottom: 5px; }
.truck-count { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; }
.truck-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.price-item { background: var(--bg-card); padding: 15px; border-radius: 8px; text-align: center; border: 1px solid var(--border-color); }
.price-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px; font-weight: 600; }
.price-value { display: block; font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.price-calc { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 3px; }
.form-section { display: none; margin-top: 40px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--secondary); }
.form-control { width: 100%; padding: 12px 15px; border: 2px solid var(--border-color); border-radius: 8px; font-size: 1rem; font-family: inherit; background: var(--bg-body); color: var(--text-main); }
.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }
.address-group { display: flex; gap: 10px; margin-bottom: 10px; }
.address-group select { width: 140px; flex-shrink: 0; }
.estimate-preview { background: var(--bg-body); padding: 20px; border-radius: 8px; margin-bottom: 25px; border-left: 4px solid var(--primary); }
.estimate-preview-title { font-weight: 700; margin-bottom: 10px; color: var(--secondary); }
.estimate-preview-text { font-family: monospace; white-space: pre-wrap; font-size: 0.9rem; color: var(--text-muted); }
@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 0; }
    .address-group { flex-direction: column; }
    .address-group select { width: 100%; }
}
