:root {
    /* Color Palette - Intellectual & Trust */
    --primary: #0F172A;
    /* Deep Navy Blue (Original) */
    --primary-light: #1E293B;
    --accent: #D4AF37;
    /* Subtle Gold */
    --accent-hover: #F3C453;
    --text-main: #334155;
    --text-muted: #64748B;
    --bg-main: #F8FAFC;
    --bg-alt: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-subtle: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(15, 23, 42, 0.25);
}

.nowrap {
    display: inline-block;
    white-space: nowrap;
}

/* PC/スマホ表示切り替え用ユーティリティ */
.pc-only {
    display: block;
}

br.pc-only {
    display: initial;
}

.mobile-only {
    display: none;
}

/* スマホ専用改行：PCでは非表示、モバイルで有効化 */
.mobile-br {
    display: none;
}

.ib {
    display: inline-block;
    white-space: nowrap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--primary);
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary);
    box-shadow: 0 4px 14px 0 rgba(212, 175, 55, 0.39);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 1.5rem 0;
    background: transparent;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-subtle);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap !important; /* Force natural vertical wrapping on small viewports */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 57px;
    width: auto;
    display: block;
    object-fit: contain;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    margin: 0 auto 0.5rem;
    display: block;
}

.navbar.scrolled .logo,
.navbar.scrolled .nav-links a {
    color: var(--primary);
}

.navbar.transparent .logo,
.navbar.transparent .nav-links a {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap !important; /* Force link wrapping inside mobile navbar */
}

.nav-links a {
    text-decoration: none;
    font-weight: 500;
    font-size: 1.4rem;
    transition: color 0.3s ease;
    position: relative;
    text-align: center;
    line-height: 1.2;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('images/hp-title.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Abstract architectural background elements */
.hero::before {
    content: '';
    position: absolute;
    width: 150vw;
    height: 150vw;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -50vw;
    right: -25vw;
}

.hero::after {
    content: '';
    position: absolute;
    width: 100vw;
    height: 100vw;
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    bottom: -50vw;
    left: -20vw;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
}

.hero-title {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.hero-watermark {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background-color: rgba(15, 23, 42, 0.4);
    /* Thinner navy transparency */
    color: white;
    padding: 6px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 5;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* Sections General */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--accent);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-description {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile first: 1 column by default */
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-main);
}

.about-paragraph {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.about-paragraph::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #cbd5e1;
}

.about-block-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.about-paragraph p {
    margin-bottom: 0;
}

.text-accent-blue {
    color: #3b5a82;
    font-weight: 700;
}

.about-image-wrapper {
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    position: relative;
    background: var(--primary);
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image-wrapper:hover .about-img {
    transform: scale(1.5);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-subtle);
}

.structure-card {
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

.structure-line {
    width: 60%;
    height: 2px;
    background-color: var(--primary);
    margin: 10px 0;
    position: relative;
    opacity: 0.3;
}

.line-1 {
    transform: translateX(-20px);
    width: 80%;
}

.line-2 {
    transform: translateX(20px);
}

.line-3 {
    transform: translateX(-10px);
    width: 40%;
}

.structure-card span {
    margin-top: 2rem;
    font-weight: 500;
    color: var(--primary-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Value Section */
.value-section {
    background-color: var(--bg-alt);
}

.value-cards {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile first: 1 column by default */
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.value-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: left;
    text-decoration: none !important;
    /* Remove blue underline */
    color: inherit !important;
    display: block;
}

.value-card * {
    text-decoration: none !important;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card-header-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.card-num {
    font-size: 2.2rem;
    font-weight: 700;
    color: #e2e8f0;
    /* Balanced grey as in Image (Right) */
    line-height: 1;
    margin: 0;
}

.card-tag {
    background: var(--primary);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    margin: 0;
}

.card-text {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Value Flow Section */
.value-flow {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background: var(--bg-main);
    border-radius: 12px;
}

.text-navy-bold {
    color: #002B5B;
    /* GAC Logo Navy */
    font-weight: 700;
}

.flow-header {
    text-align: center;
    margin-bottom: 3rem;
}

.flow-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.flow-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.flow-message-box {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    max-width: 95%;
    /* スマホでもはみ出さないように */
    border: 1px solid #e2e8f0;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin: 1rem auto 0;
}

.flow-message-box p {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.0rem;
    margin: 0;
    line-height: 2em;
    text-align: center;
    /* Maintained center-align for PC */
}

/* Flow Images Grid */
.flow-images-grid {
    display: flex;
    gap: 0.8rem;
    margin: 1rem 0;
}

.flow-img-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    flex: 0 1 auto;
    /* 自然な幅を維持 */
}

.flow-img-wrapper img {
    height: 220px;
    /* PC版では上下（高さ）を揃える */
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    /* トリミングしない */
}

.img-label {
    position: absolute;
    top: 0;
    left: 0;
    background: #475569;
    color: white;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.flow-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.flow-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    scroll-margin-top: 120px;
    /* Offset to keep target title visible below the header */
}

.flow-side {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 5px;
    /* Precision downward shift to match tag row center */
}

.phase-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    line-height: 1;
    /* Match header row */
}

.phase-duration {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.flow-main {
    position: relative;
    padding-left: 2.2rem;
    padding-bottom: 2.5rem;
    /* 矢印の位置を下げるために余白を追加 */
}

/* The Vertical Line */
.flow-main::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #cbd5e1;
    z-index: 1;
}

/* Only Phase 1 line starts from the number's center */
.flow-item:first-of-type .flow-main::before {
    top: 15px;
    height: calc(100% - 15px);
}

/* Only last phase line ends at the number's center */
.flow-item:last-of-type .flow-main::before {
    height: 15px;
}

.flow-dot {
    position: absolute;
    left: 1.5px;
    transform: translateX(-50%);
    top: 5px;
    /* Precision downward shift to match tag center */
    width: 2.5rem;
    /* Fixed width to ensure stable centering regardless of font glyph width */
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #cbd5e1;
    background: #f8fafc;
    z-index: 2;
    line-height: 1;
    letter-spacing: -0.05em;
}

/* Mask the timeline line sticking out above the numbers */
.flow-dot::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: #f8fafc;
    /* Match Value Flow background */
    z-index: -1;
}

/* Arrow at the bottom of the line */
.flow-main::after {
    content: '';
    position: absolute;
    left: -5.5px;
    /* Centered on 3px line (center at 1.5px, width 14px -> 1.5 - 7 = -5.5) */
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 11px solid #cbd5e1;
    z-index: 2;
}

.flow-item:last-child .flow-main {
    border-left-color: transparent;
}

.flow-item:last-child .flow-main::before,
.flow-item:last-child .flow-main::after {
    display: none !important;
}

.flow-tag-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.flow-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.flow-catchphrase {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    position: relative;
}

.flow-catchphrase::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateY(-50%);
}

.flow-content ol {
    list-style: none;
    counter-reset: flow-counter;
}

.flow-content ol>li {
    counter-increment: flow-counter;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.flow-content ol>li:last-child {
    margin-bottom: 0;
}

.flow-content ol>li::before {
    content: counter(flow-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 1.4rem;
    height: 1.4rem;
    background: #e2e8f0;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.sub-card {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-left: 4px solid var(--accent);
}

.flow-divider {
    display: block;
    /* グリッドではなくブロックとして扱う */
    width: fit-content;
    /* 文字数に合わせる */
    margin: 1.5rem 0 1.5rem 232px;
    /* 左端から縦線の位置（232px）までマージンを取る */
    transform: translateX(-50%);
    /* 自分の幅の半分だけ戻して、線を中央にする */
    padding: 0.8rem 2.5rem;
    background: #f0f7ff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    white-space: nowrap;
    /* 改行を防いで幅を安定させる */
    z-index: 5;
    position: relative;
}

.flow-divider span {
    font-weight: normal;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.duration-guide {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #cbd5e1;
}

.duration-guide strong {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: var(--primary);
}

.duration-guide small {
    display: block;
    margin-top: 1rem;
    color: var(--text-muted);
}

/* Company Section */
.company-table-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

.company-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.company-table th,
.company-table td {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

.company-table th {
    width: 30%;
    color: var(--primary);
    font-weight: 500;
    background-color: #f8fafc;
}

.company-table td {
    color: var(--text-main);
}

/* Representative Profile */
.representative-profile {
    max-width: 800px;
    margin: 4rem auto 0;
}

.profile-header {
    text-align: left;
    margin-bottom: 1.5rem;
}

.profile-header h3 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.profile-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-card {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
}

.profile-card h4 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-card h4 span {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: normal;
}

.profile-card p {
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.profile-card p:last-child {
    margin-bottom: 0;
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: white;
    padding: 1.5rem 0;
}

.footer-content {
    display: none;
}

.footer-brand h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-contact {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Professional Team Section */
.team-section {
    background-color: var(--bg-alt);
}

.team-content {
    max-width: 800px;
    margin: 0 auto;
}

.team-content {
    max-width: 950px;
    margin: 0 auto;
}

.team-long-description {
    line-height: 2;
    color: var(--text-main);
    margin-bottom: 3.5rem;
    text-align: center;
    /* Maintained center-align for PC */
    font-weight: 500;
}

.team-stats-wrapper {
    display: flex;
    justify-content: center;
}

.team-stats-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.team-stats-list li {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 420px;
    /* Expanded from 320px to fit longer qualification titles in one line */
}

.team-stats-list .qualification {
    color: var(--text-main);
    font-weight: 500;
}

.team-stats-list .count {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    min-width: 60px;
    /* 数字エリアの幅を固定してズレを防止 */
    text-align: right;
    /* 右端にピタッと揃える */
}

.design-division {
    margin-top: 4rem;
    padding: 2.5rem 2rem;
    border: 1.5px solid var(--primary);
    text-align: center;
    background: white;
    max-width: 830px;
    margin-left: auto;
    margin-right: auto;
}

.design-division-header {
    font-size: 1.6rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.design-division-header .divider {
    font-weight: normal;
    color: #cbd5e1;
    margin: 0 0.8rem;
}

.design-division-header .brand-name {
    color: #777;
    font-weight: 900;
}

.mobile-br {
    display: none;
}

.design-division p {
    line-height: 1.8;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.05rem;
    margin-bottom: 0;
}

/* Renovation Works Page */
.renovation-works-section {
    padding: 144px 0 6rem 0;
    background-color: #ffffff;
    min-height: 80vh;
}

.rw-main-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 3.5rem;
    letter-spacing: 0.05em;
}

.rw-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 1050px;
    margin: 0 auto;
}

.rw-card {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--primary);
    background: #fff;
}

.rw-card-top {
    background-color: #888888;
    color: #ffffff;
    display: flex;
    padding: 0.5rem 1rem;
    align-items: center;
    height: 105px;
    box-sizing: border-box;
}

.rw-card-num {
    font-size: 1.6rem;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    line-height: 1;
    margin-right: 0.5rem;
    width: 35px;
}

.rw-card-title-group {
    flex: 1;
    text-align: center;
}

.rw-card-title {
    font-size: 1.36rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.rw-card-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.rw-card-bottom {
    padding: 2rem 1.5rem;
    min-height: 160px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.rw-card-bottom p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
    margin: 0;
    letter-spacing: 0.02em;
}

/* Works Detail Section (03) */
.works-detail-section {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid #ddd;
}

.works-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile first: 1 column by default */
    gap: 15px;
}

.works-col-left,
.works-col-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.works-img-wrapper {
    position: relative;
    width: 100%;
}

.works-img-wrapper:not(.stretch-img) {
    aspect-ratio: 4/3;
}

.works-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.works-info-box {
    border: 1px solid var(--primary);
    display: flex;
    flex-direction: column;
}

.works-info-header {
    background-color: #888888;
    color: #fff;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.works-info-title-group {
    text-align: center;
}

.works-info-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.works-info-subtitle {
    font-size: 0.95rem;
    font-weight: 700;
}

.works-info-body {
    background-color: #fff;
    padding: 2rem;
}

.works-info-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    color: var(--text-main);
    font-weight: 500;
}

.works-keywords {
    margin-top: 1.5rem;
}

.works-keywords .keyword-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.works-keywords .keyword-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}

.works-col-right .stretch-img {
    flex: 1;
    height: 100%;
}


.badge-before,
.badge-after {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    z-index: 2;
}

.badge-before {
    background-color: #333333;
}

.badge-after {
    background-color: var(--primary);
}

.badge-design {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    z-index: 2;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 1100px) {
    .works-col-right .stretch-img {
        aspect-ratio: 4/3;
        flex: none;
    }

    .section {
        padding: 2.7rem 0;
        /* 元の6remから55%削減 */
    }

    .section-header {
        margin-bottom: 2.0rem;
        /* スマホ版のみ50%詰める（元の4remから） */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero {
        background-position: 30% center;
    }

    .nav-container {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .navbar {
        background: var(--glass-bg) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        box-shadow: var(--shadow-subtle) !important;
        padding: 0.7rem 0 !important;
        /* 1remから30%削減 */
    }

    .navbar .logo,
    .navbar .nav-links a {
        color: var(--primary) !important;
        text-shadow: none !important;
    }

    .nav-links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1rem !important;
    }

    .nav-links a {
        font-size: 0.85rem !important;
        line-height: 0.85 !important;
        /* 1.2から約30%削減 */
    }

    .logo-img {
        height: 34px !important;
    }

    .works-info-header {
        padding: 1.2rem 1rem !important;
    }

    .works-info-title {
        font-size: 1.05rem !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
    }

    .works-info-body {
        padding: 1.2rem !important;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

    .profile-card h4 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .profile-card h4 .pipe {
        display: none;
    }

    .footer-contact {
        text-align: center;
    }

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
    }

    .company-table th {
        padding-bottom: 0.5rem;
        background-color: transparent;
        padding-top: 1.5rem;
        border-bottom: none;
        /* スマホ版では見出し下の線を消去 */
    }

    .profile-card h4 {
        border-bottom: none;
        /* 代表者名の下の線を消去 */
        margin-bottom: 0.5rem;
    }

    .company-table td {
        padding-top: 0;
    }

    .value-flow {
        padding: 0.5rem 1rem;
        /* 0.96remから削減 */
    }

    .flow-header {
        margin-bottom: 0.75rem;
        /* 1.44remから約半分に削減 */
    }

    .flow-title {
        margin-bottom: 0.24rem;
    }

    .flow-item {
        grid-template-columns: 1fr;
        gap: 0rem;
        padding: 1rem 0;
        /* 2remから半分に削減 */
    }

    .flow-side {
        text-align: left;
    }

    .flow-main {
        margin-top: 0.5rem;
        padding-left: 1.5rem;
        padding-bottom: 2rem;
        border-left: none;
    }

    .flow-tag-row {
        gap: 0.5rem;
    }

    .value-cards {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        /* 1.05remからさらに半分程度に削減 */
        margin-bottom: 2.5rem;
        /* 5remから半分に削減 */
    }

    .value-card {
        padding-top: 1.25rem;
        /* 2.5remから半分に削減 */
        padding-bottom: 1.25rem;
        /* 1.75remからさらに削減 */
    }

    .card-header-row {
        gap: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .card-num {
        font-size: 1.8rem;
    }

    .card-tag {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }

    .flow-message-box {
        padding: 0.48rem;
        width: 100%;
    }

    .flow-images-grid {
        flex-direction: column;
        gap: 0.8rem;
    }

    .flow-img-wrapper img {
        width: 100%;
        /* スマホ版では左右（幅）を揃える */
        height: auto;
    }

    .flow-message-box p {
        font-size: 0.9rem;
    }

    .flow-divider {
        grid-column: 1;
        margin-left: 0;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.3rem;
        padding: 0.8rem 1rem;
    }

    .flow-catchphrase {
        font-size: 0.9rem;
    }

    .team-stats-list {
        gap: 0.85rem;
    }

    .team-stats-list li {
        width: 100%;
        max-width: none;
        font-size: 0.95rem;
        /* 文字サイズを戻して読みやすく */
        gap: 15px;
    }

    .team-stats-list .count {
        font-size: 1.15rem;
        /* 数字の存在感を戻す */
    }

    .flow-tag-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .flow-divider {
        margin: 1.5rem auto;
        /* スマホ版はシンプルに中央寄せ */
        transform: none;
        /* PC版のずらし設定を解除 */
        width: fit-content;
        padding: 0.8rem 1.5rem;
        display: block;
        text-align: center;
    }

    .flow-catchphrase::before {
        display: none;
    }

    .pc-only {
        display: none;
    }

    .mobile-br {
        display: block;
    }

    .design-division {
        margin-top: 3rem;
        padding: 2rem 0.8rem;
        /* 文字サイズ拡大に合わせ、わずかに余白を調整 */
    }

    .design-division-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        font-size: 1.3rem;
    }

    .design-division-header .divider {
        display: none;
    }

    .design-division-header .brand-name {
        font-size: 1.5rem;
    }

    .design-division p {
        font-size: 0.9rem;
        /* 指定の改行位置で1行に収まる最大級のサイズに拡大 */
        text-align: center;
        line-height: 1.8;
        /* 文字サイズに合わせ、行間を最適化 */
    }

    .flow-message-box p {
        text-align: center;
        font-size: 1.0rem;
        line-height: 1.7;
    }

    .duration-guide {
        border-top: none;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }

    .team-long-description {
        text-align: left;
        font-size: 0.9rem;
        /* 10% smaller to improve fit */
        line-height: 1.8;
        text-wrap: balance;
        /* Automatically balances line lengths to avoid orphans */
    }

    .container {
        padding: 0 1.5rem;
        /* Slightly more room for text */
    }

    .hero-watermark {
        bottom: 15px;
        right: 50%;
        transform: translateX(50%);
        font-size: 0.8rem;
        padding: 5px 12px;
        width: max-content;
        letter-spacing: 0;
    }

    .about-paragraph:last-of-type {
        margin-bottom: 0;
        /* スマホ版のみ、最後の段落の下の余白を詰める */
    }

    .pc-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* PC/Tablet specific styles (min-width: 769px) */
@media (min-width: 1101px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }

    .value-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .works-detail-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    }
}