/* ============================================================
   ipledge2_index.css
   HIG-aligned RWD: Phone <768px | Tablet 768–1024px | Desktop >1024px
   ============================================================ */

/* ----------------------------------------------------------
   Base (mobile-first)
   Body font-size 17px per HIG minimum body text guideline
   ---------------------------------------------------------- */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #E44D26;
    color: white;
    text-align: center;
    font-size: 17px;
    line-height: 1.6;
}

/* ----------------------------------------------------------
   Navbar
   ---------------------------------------------------------- */
.navbar {
    width: 100%;
    background-color: var(--brand-orange);
    padding: var(--padding-base) 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1030;
    transition: max-height 0.3s ease;
    overflow: hidden;
}
.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0;
}
.navbar-logo {
    height: 40px;
}
.navbar-menu {
    display: inline-block;
    position: relative;
}
.navbar-menu-icon {
    background-color: transparent;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 40px;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
}
.dropdown-content {
    display: none;
    background: linear-gradient(to bottom, var(--brand-orange), var(--brand-yellow));
    width: 100%;
    top: 60px;
    z-index: 1040;
    padding: 20px 16px 60px;
    color: white;
    box-sizing: border-box;
}
.navbar.expanded .dropdown-content {
    display: block;
}
.dropdown-header {
    margin: 0;
    font-size: 1em;
    font-weight: bold;
}
.dropdown-text {
    margin: 10px;
    font-size: 0.85em;
}
.dropdown-button {
    background-color: white;
    color: var(--brand-orange);
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: var(--button2-size);
    font-weight: bold;
    min-height: 44px;
}
.dropdown-button:hover {
    background-color: #f1f1f1;
}

/* ----------------------------------------------------------
   Main Visual
   ---------------------------------------------------------- */
.main-visual-icon {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.main-visual {
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    width: 100%;
}
.main-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
}

/* ----------------------------------------------------------
   Brandtext — 已移除橘色區塊，保留空殼供向後相容
   ---------------------------------------------------------- */

/* ----------------------------------------------------------
   宣誓表單
   ---------------------------------------------------------- */
.b1 {
    position: relative;
    letter-spacing: 0;
    line-height: 1.6;
    font-size: clamp(15px, 2.2vw, 20px);
    text-align: center;
}
.child {
    align-self: stretch;
    position: relative;
    border-top: 2px solid var(--brand-orange);
    box-sizing: border-box;
    height: 2px;
}
/* ── 宣誓項目 pledge-check（新版，取代舊 checkbox）── */
.pledge-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--brand-orange);
    border-radius: 3px;
    background-color: transparent;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background-color 0.15s ease;
}
.pledge-check::after {
    content: '\2714';
    color: white;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.box1.is-checked .pledge-check,
.box6.is-checked .pledge-check {
    background-color: var(--brand-orange);
}
.box1.is-checked .pledge-check::after,
.box6.is-checked .pledge-check::after {
    opacity: 1;
}
/* ── 宣誓卡片：mobile-first，無固定高寬 ── */
.prt-web-01-icon, .prt-web-06-icon {
    width: 75%;
    max-width: 80px;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    display: block;
}
.box1, .box6 {
    flex: 0 0 calc(33.33% - 6px);
    width: calc(33.33% - 6px);
    max-width: calc(33.33% - 6px);
    aspect-ratio: 160 / 190;
    border-radius: var(--br-base);
    background-color: var(--background);
    border: 4px solid var(--brand-orange);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 28px 6px 12px;
    gap: 6px;
    cursor: pointer;
    position: relative;
    min-height: 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
    color: var(--grey);
}
.pledge-item-label {
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
    margin-top: 4px;
    word-break: keep-all;
}
/* Mobile：flex wrap，上3下2置中 */
.div2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.table-child {
    align-self: stretch;
    position: relative;
    border-radius: var(--br-xs);
    background-color: var(--background);
    border: 1px solid var(--brand-orange);
    box-sizing: border-box;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 12px;
}
.editable-input {
    width: 100%;
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 17px;
    color: #333;
}
/* ── field-row：label + input 同一行 ── */
.field-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.field-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    flex-shrink: 0;
    width: 72px;
    cursor: pointer;
}
.field-label-text {
    font-size: 15px;
    color: #000;
    font-weight: normal;
    white-space: nowrap;
    line-height: 1.3;
}
.field-required {
    font-size: 12px;
    color: var(--brand-orange);
    white-space: nowrap;
    line-height: 1.2;
}
.field-input {
    flex: 1;
    min-width: 0;
}
.item {
    width: 24px;
    height: 24px;
    appearance: none;
    border: 1px solid var(--brand-orange);
    border-radius: 50%;
    background-color: var(--background);
    cursor: pointer;
    margin-right: 8px;
    position: relative;
}
.item:checked {
    background-color: var(--brand-orange);
    border: 1px solid var(--brand-orange);
}
.item:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: var(--background);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.div7 {
    align-self: stretch;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
}
.email {
    position: relative;
    letter-spacing: 0.03em;
    line-height: 175%;
}
.span {
    text-decoration: underline;
    color: var(--brand-orange);
}
.div14 {
    align-self: stretch;
    position: relative;
    font-size: 14px;
    letter-spacing: 0.03em;
    line-height: 175%;
}
.div15 {
    width: 130px;
    position: relative;
    letter-spacing: 0.03em;
    line-height: 175%;
    display: flex;
    align-items: center;
}
.line-icon,
.fb-icon {
    width: 44px;
    height: 44px;
    object-fit: cover;
    cursor: pointer;
}
.social-media {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--gap-xs);
    cursor: pointer;
}
.icon-copy {
    width: clamp(11px, 3.6vw, 15px);
    position: relative;
    height: auto;
    flex: 0 0 auto;
}
.button2 {
    border-radius: var(--br-xs);
    background-color: var(--brand-orange);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(6px, 2.4vw, 12px);
    gap: clamp(3px, 1.2vw, 6px);
    border: none;
    color: var(--white);
    cursor: pointer;
    flex: 0 1 clamp(80px, 28vw, 130px);
    width: clamp(80px, 28vw, 130px);
    min-width: 0;
    height: 28px;
    font-size: clamp(10px, 2.8vw, 14px);
    line-height: 1;
    white-space: nowrap;
}
.button2 .div17 {
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
}
.link-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--br-xs);
    background-color: var(--background);
    border: 1px solid var(--brand-orange);
    box-sizing: border-box;
    height: 38px;
    width: 100%;
    padding: 4px var(--padding-5xs);
}
.link-input {
    border: none;
    background: transparent;
    width: 100%;
    min-width: 0;
    padding: 0 10px;
    font-size: clamp(12px, 3.5vw, 17px);
    color: var(--black);
}
.link-input:focus {
    outline: none;
}
.table {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--gap-xs);
    text-align: left;
    font-size: 17px;
    color: var(--black);
}
.button1 {
    display: block;
    padding: 14px 40px;
    background-color: var(--brand-orange);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    margin: 4px auto;
    width: fit-content;
    min-height: 44px;
}
.button1:hover {
    background-color: #cf4d1e;
}
.div1 {
    display: none;
}
.div1 {
    max-width: 960px;
    min-width: 0;
    width: calc(100vw - 32px);
    margin: 32px auto 32px;
    border-radius: var(--br-5xl);
    background-color: var(--form-orange);
    border: 4px solid var(--brand-orange);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 16px;
    gap: 24px;
    color: var(--brand-orange);
    box-sizing: border-box;
}
#my_div2,
#my_div3 {
    padding: 24px 16px;
}

/* ----------------------------------------------------------
   成功訊息
   ---------------------------------------------------------- */
.success-message-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.success-message {
    text-align: center;
    padding: clamp(32px, 5vw, 56px) 16px;
    width: 100%;
    max-width: 760px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(22px, 3vw, 32px);
}
.success-logo {
    width: clamp(112px, 11vw, 152px);
    height: auto;
    margin-bottom: 0;
}
#ipledge_ret {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(18px, 2.4vw, 28px);
    width: 100%;
}
.success-status-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 1.8vw, 20px);
    color: var(--brand-orange);
}
.success-checkmark {
    width: clamp(34px, 4vw, 44px);
    height: clamp(34px, 4vw, 44px);
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 700;
    line-height: 1;
}
.b2 {
    font-size: clamp(30px, 4vw, 44px);
    color: var(--brand-orange);
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.03em;
}
.success-text {
    margin: 0;
    font-size: clamp(18px, 2.2vw, 24px);
    color: var(--brand-orange);
    font-weight: bold;
    line-height: 1.65;
    max-width: 720px;
}
.success-message .button1 {
    margin-top: clamp(2px, 1vw, 8px);
    min-width: clamp(160px, 20vw, 220px);
}

/* ----------------------------------------------------------
   Bar Chart
   ---------------------------------------------------------- */
.barchart-container1 {
    width: 100%;
    padding: 20px 16px;
    background-color: var(--brand-orange);
    margin-bottom: 32px;
    box-sizing: border-box;
    min-height: 500px;
}
.barchart-header {
    margin-bottom: 20px;
    text-align: center;
}
.barchart-title {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: bold;
    color: white;
    line-height: 1.2;
}
hr {
    border: 0;
    border-top: 2px solid #ffffff;
    width: 50%;
    margin: 12px auto;
}
.chart-container2 {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    height: auto;
}
.chart-wrapper {
    width: 100%;
    max-width: 1200px;
    position: relative;
    height: clamp(300px, 45vh, 480px);
}
.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ----------------------------------------------------------
   宣誓總數
   ---------------------------------------------------------- */
.container2 {
    display: flex;
    width: 100%;
    flex-direction: column;
    margin-bottom: 32px;
}
.left, .right {
    flex: 1;
    overflow: hidden;
    min-height: 140px;
}
.left {
    background-color: var(--brand-yellow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
.right {
    background-color: var(--brand-orange);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
.title {
    font-size: clamp(36px, 8vw, 60px);
    font-weight: bold;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}
.image {
    text-align: center;
}
.image img {
    max-width: 100%;
    height: auto;
}

/* ----------------------------------------------------------
   合作單位
   ---------------------------------------------------------- */
.cooperation {
    background-color: white;
    border-radius: var(--br-5xl);
    padding: 16px;
    width: calc(100% - 32px);
    margin: 0 auto 32px;
    box-sizing: border-box;
}
.div64, .div72 {
    margin: 20px 16px;
}
.section-title {
    font-size: clamp(16px, 2.5vw, 20px);
    text-align: left;
    color: var(--grey);
    margin-bottom: 8px;
}
.child17 {
    width: 100%;
    height: 1px;
    background-color: var(--grey);
    margin-bottom: 16px;
}
.logo-01-taipei-gov-parent,
.logo-tdd-parent,
.alc-suntory-parent,
.ot-icrt-parent {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
}
.logo-01-taipei-gov-icon {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.brand-logo-icon {
    width: 100%;
    height: auto;
    object-fit: cover;
}


/* ----------------------------------------------------------
   Overlays
   ---------------------------------------------------------- */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.overlay-content {
    position: relative;
    background: linear-gradient(to bottom, var(--brand-orange), var(--brand-yellow));
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 90%;
    max-width: 560px;
    padding: 60px 24px 32px;
    border: 1px solid white;
    box-sizing: border-box;
}
.overlay-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 44px; height: 44px;
    background-color: var(--brand-orange);
    border: none;
    border-radius: 50%;
    font-size: 1.2em;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}
.overlay-logo {
    width: clamp(50px, 8vw, 80px);
    height: auto;
    margin-bottom: 0.1em;
}
.overlay-header1 {
    font-size: clamp(20px, 3vw, 34px);
    color: white;
    margin: 10px 0;
    letter-spacing: 0.1em;
}
.overlay-header2 {
    font-size: clamp(24px, 4vw, 48px);
    color: white;
    margin: 10px 0;
}
.overlay-text {
    font-size: clamp(17px, 2.5vw, 24px);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 16px 0;
    font-weight: bold;
    letter-spacing: 0.05em;
}
.overlay-subtext {
    font-size: clamp(15px, 2vw, 20px);
    font-weight: bold;
    text-decoration: underline;
    color: white;
    margin: 16px 0;
    letter-spacing: 0.1em;
}
.button-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}
.overlay-button {
    border: none;
    padding: 12px 40px;
    border-radius: 30px;
    cursor: pointer;
    font-size: var(--subtitle1-size);
    font-weight: bold;
    min-height: 44px;
}
.overlay-button:first-child {
    background-color: var(--brand-orange);
    color: white;
}
.overlay-button:last-child {
    background-color: white;
    color: var(--brand-orange);
}
.info-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.info-overlay-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 20px 24px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: auto;
    border: 4px solid transparent;
    background-clip: padding-box, border-box;
    background-origin: border-box;
    background-image: linear-gradient(var(--white), var(--white)),
                      linear-gradient(to right, var(--brand-orange), var(--brand-yellow));
    box-sizing: border-box;
}
.info-overlay-close {
    position: absolute;
    top: 0.8em; right: 0.8em;
    width: 32px; height: 32px;
    background-color: var(--brand-orange);
    border: none;
    border-radius: 50%;
    font-size: 1em;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.info-overlay-header {
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    color: black;
    margin: 48px 20px 20px;
}
.info-overlay-divider {
    margin: 20px auto;
    border: 0;
    border-top: 2px solid var(--brand-orange);
    width: 100%;
}
.info-overlay-text {
    font-size: 0.85em;
    margin-bottom: 60px;
    color: black;
    line-height: 1.6;
}
.info-overlay-text ul {
    list-style-type: disc;
    padding-left: 20px;
}
.info-overlay-button {
    display: block;
    padding: 14px 40px;
    background-color: var(--brand-orange);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    margin: 20px auto;
    width: fit-content;
    min-height: 44px;
}
.info-overlay-button:hover {
    background-color: #cf4d1e;
}

/* ----------------------------------------------------------
   Outer wrapper & event container
   ---------------------------------------------------------- */
.tbaf-homepage-memeber {
    width: 100%;
    position: relative;
    background-color: var(--background);
    overflow: hidden;
    text-align: center;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.event_container {
    max-width: 960px;
    min-width: 0;
    width: calc(100vw - 32px);
    margin: 0 auto 32px;
    border-radius: var(--br-5xl);
    background-color: var(--form-orange);
    border: 4px solid var(--brand-orange);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 16px;
    gap: 20px;
    color: var(--brand-orange);
    box-sizing: border-box;
}
.centered { text-align: center; }
.right-align {
    align-self: flex-end;
    text-align: left;
    width: 100%;
    line-height: 1.8;
}
.event_container h2 { font-size: clamp(24px, 4vw, 34px); }
.event_container h3 { font-size: clamp(20px, 3vw, 24px); }
.right-align p,
.right-align ul,
.right-align li {
    font-size: 17px;
    color: var(--grey);
    margin-bottom: 1em;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}
table, th, td { border: 1px solid var(--grey); }
th, td { padding: 8px; text-align: left; }
th { background-color: white; }
tbody tr { background-color: white; }
a { color: var(--brand-orange); text-decoration: none; }

/* ============================================================
   TABLET  768px – 1024px
   HIG: regular width, 24px side margins
   ============================================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    .navbar { padding: var(--padding-base) 24px; }
    .main-visual img { width: 110%; }
    .brandtext { padding: 36px 48px; gap: 14px; margin-bottom: 40px; }
    .div1 {
        width: calc(100% - 48px);
        padding: 28px 40px;
        gap: 28px;
        margin-bottom: 40px;
    }
    #my_div2, #my_div3 { padding: 28px 40px; }
    .div2 {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
    }
    .box1, .box6 {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 0;
        padding: 10px 6px;
        font-size: 13px;
    }
    .prt-web-01-icon, .prt-web-06-icon {
        max-width: 90px;
    }
    .container2 { flex-direction: row; max-height: 240px; margin-bottom: 40px; }
    .logo-01-taipei-gov-parent,
    .logo-tdd-parent,
    .alc-suntory-parent,
    .ot-icrt-parent { grid-template-columns: repeat(4, 1fr); }
    .div64, .div72 { margin: 20px 24px; }
    .cooperation {
        width: calc(100% - 48px);
        padding: 20px 24px;
        margin-bottom: 40px;
    }

    .barchart-container1 { padding: 20px 24px; margin-bottom: 40px; }
    .chart-wrapper { height: clamp(350px, 48vh, 460px); }
    .event_container {
        width: calc(100% - 48px);
        padding: 28px 40px;
        margin-bottom: 40px;
    }
    .overlay-content { width: 75%; }
}

/* ============================================================
   DESKTOP  > 1024px
   HIG: large width, 32px+ margins, max-width container
   ============================================================ */
@media (min-width: 1025px) {
    .navbar { padding: var(--padding-base) 32px; }
    .main-visual {
        max-height: 560px;
    }
    .main-visual img {
        width: 100%;
        max-height: 560px;
        object-fit: cover;
        object-position: center top;
    }
    .brandtext { padding: 48px 10%; gap: 16px; margin-bottom: 64px; }
    .b { font-size: clamp(28px, 3vw, 34px); max-width: 860px; }
    .tbaf { font-size: clamp(16px, 1.4vw, 18px); max-width: 860px; }
    .div1 {
        width: calc(100% - 128px);
        max-width: 960px;
        padding: 32px 80px;
        gap: 32px;
        margin-top: 64px;
        margin-bottom: 64px;
    }
    #my_div2, #my_div3 { padding: 32px 80px; }
    .div2 {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
        justify-content: center;
    }
    .box1, .box6 {
        flex: 0 0 160px;
        max-width: 160px;
        height: auto;
        min-height: 0;
        padding: 16px 10px;
        font-size: 14px;
    }
    .prt-web-01-icon, .prt-web-06-icon {
        max-width: 120px;
    }
    .container2 { flex-direction: row; max-height: 297px; margin-bottom: 64px; }
    .logo-01-taipei-gov-parent,
    .logo-tdd-parent,
    .alc-suntory-parent,
    .ot-icrt-parent { grid-template-columns: repeat(6, 1fr); }
    .div64, .div72 { margin: 20px 28px; }
    .cooperation {
        width: calc(100% - 256px);
        padding: 24px 40px;
        margin: 0 auto;
        margin-bottom: 64px;
    }

    .barchart-container1 { padding: 24px 32px; margin-bottom: 64px; }
    .chart-container2 { flex-direction: row; }
    .chart-wrapper { height: clamp(400px, 50vh, 500px); }
    #chart2, #chart3 { display: none; }
    .event_container {
        width: calc(100% - 128px);
        max-width: 960px;
        padding: 32px 80px;
        margin: 0 auto 64px;
    }
    .overlay-content { width: 55%; }
}

/* ============================================================
   TBAF New Footer (v2 — matches tbaf.org.tw)
   ============================================================ */
.tbaf-footer {
    width: 100%;
    background-color: var(--brand-orange);
    box-sizing: border-box;
    font-family: 'Roboto Condensed', 'Roboto', sans-serif;
    text-align: left;
}
.tbaf-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 16px;
    box-sizing: border-box;
}
.tbaf-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 40px;
    text-align: left;
    justify-items: start;
}
.tbaf-footer-brand {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}
.tbaf-footer-logo {
    height: 48px;
    width: auto;
}
.tbaf-footer-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
    text-decoration: none;
    opacity: 0.9;
}
.tbaf-footer-email:hover { opacity: 1; }
.tbaf-footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
}
.tbaf-footer-social a {
    color: white;
    display: flex;
    align-items: center;
    opacity: 0.9;
    transition: opacity 0.2s;
    text-decoration: none;
}
.tbaf-footer-social a:hover { opacity: 1; }
.tbaf-footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}
.tbaf-footer-col-title {
    font-size: 16px;
    font-weight: bold;
    color: white;
    letter-spacing: 0.03em;
}
.tbaf-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tbaf-footer-col ul li a {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}
.tbaf-footer-col ul li a:hover { color: white; }
.tbaf-footer-copyright {
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: center;
    padding: 16px;
    text-align: center;
}
.tbaf-footer-copyright span {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    text-align: center;
}
@media (min-width: 768px) {
    .tbaf-footer-inner { padding: 64px 24px; }
    .tbaf-footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }
    .tbaf-footer-brand { grid-column: span 1; }
}
@media (min-width: 1025px) {
    .tbaf-footer-inner { padding: 64px 32px; }
}

/* ============================================================
   各縣市宣誓達標率排行榜
   ============================================================ */
.city-ranking-container {
    width: 100%;
    background-color: var(--brand-orange);
    padding: 40px 16px 48px;
    margin-bottom: 32px;
    box-sizing: border-box;
}
.city-ranking-header {
    text-align: center;
    margin-bottom: 24px;
}
.city-ranking-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: bold;
    color: white;
    display: block;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}
.city-ranking-hr {
    border: 0;
    border-top: 2px solid rgba(255,255,255,0.5);
    width: 50%;
    margin: 0 auto 12px;
}
.city-ranking-note {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}
.city-ranking-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 1100px;
    margin: 0 auto;
}
.city-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 16px;
}
.city-rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    background-color: rgba(255,255,255,0.25);
}
.city-rank-badge.rank-1 { background-color: var(--brand-yellow); }
.city-rank-badge.rank-2 { background-color: #9E9E9E; }
.city-rank-badge.rank-3 { background-color: #66BB6A; }
.city-name {
    color: white;
    font-size: 16px;
    font-weight: bold;
    width: 72px;
    flex-shrink: 0;
    text-align: left;
}
.city-bar-wrap {
    flex: 1;
    background-color: rgba(255,255,255,0.2);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}
.city-bar-fill {
    height: 100%;
    background-color: rgba(255,255,255,0.75); /* JS 會覆蓋此色 */
    border-radius: 999px;
    transition: width 0.6s ease;
    min-width: 4px;
    opacity: 0.92;
}
.city-pct {
    color: white;
    font-size: 15px;
    font-weight: bold;
    width: 42px;
    text-align: right;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .city-ranking-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px 20px;
    }
    .city-ranking-container {
        margin-bottom: 40px;
    }
}
@media (min-width: 1025px) {
    .city-ranking-container {
        padding: 48px 32px 56px;
        margin-bottom: 64px;
    }
}

/* ============================================================
   手機版極致縮高（≤450px）：表單不需滑動
   ============================================================ */
/* 451–559px */
@media (min-width: 451px) and (max-width: 559px) {
    .box1, .box6 {
        padding: 20px 5px 10px;
        gap: 5px;
    }
    .prt-web-01-icon, .prt-web-06-icon {
        max-width: 68px;
    }
    .pledge-item-label {
        font-size: 13px;
        margin-top: 2px;
    }
}

/* 560–767px */
@media (min-width: 560px) and (max-width: 767px) {
    .box1, .box6 {
        padding: 28px 6px 12px;
        gap: 8px;
    }
    .prt-web-01-icon, .prt-web-06-icon {
        max-width: 96px;
    }
    .pledge-item-label {
        font-size: 15px;
        margin-top: 4px;
    }
}
@media (max-width: 450px) {
    /* 表單卡片 */
    .div1 {
        padding: 14px 12px;
        gap: 12px;
        margin: 20px auto 20px;
    }
    /* 宣誓說明標題 */
    .b1 {
        font-size: 13px;
        line-height: 1.5;
    }
    /* 分隔線與 icon 區縮小 */
    .div2 {
        gap: 6px;
    }
    .box1, .box6 {
        padding: 18px 4px 8px;
        gap: 2px;
        font-size: 10px;
        border-width: 3px;
    }
    .prt-web-01-icon {
        max-width: 52px;
    }
    .pledge-item-label {
        font-size: 11px;
        margin-top: 2px;
    }
    /* 輸入欄縮小 */
    .table {
        gap: 6px;
    }
    .table-child {
        height: 38px;
        padding: 0 8px;
    }
    .editable-input {
        font-size: 14px;
    }
    .field-label {
        width: 62px;
    }
    .field-label-text {
        font-size: 12px;
    }
    .field-required {
        font-size: 10px;
    }
    /* 個資文字 */
    .div14 {
        font-size: 12px;
    }
    /* 分享連結區 */
    .link-container {
        height: 38px;
    }
    .link-input {
        font-size: 11px;
    }
    .button2 {
        height: 30px;
        font-size: 12px;
        flex: 0 0 80px;
        width: 80px;
    }
    /* 宣誓完成按鈕手機版縮小 */
    .button1 {
        padding: 10px 28px;
        font-size: 0.85em;
        min-height: 36px;
    }
}
