:root {
    --content-bg: #191a20;
    --content-panel: #222328;
    --content-panel-soft: #292a31;
    --content-border: rgba(255, 255, 255, .1);
    --content-text: #f2f2f3;
    --content-muted: #a9a9ae;
    --content-accent: #fbc04a;
    --content-accent-dark: #2b210c;
}

body.content-page {
    background: var(--content-bg);
    color: var(--content-text);
}

.content-page * {
    box-sizing: border-box;
}

.content-page .wrap_ff,
.content-page #qire-lasted {
    width: min(1240px, calc(100% - 48px));
    margin: 32px auto 56px;
}

/* Guestbook */
.content-page-gbook .reply_box {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.content-page-gbook .mac_msg_r,
.content-page-gbook .mac_msg_l {
    width: 100%;
    float: none;
    padding: 0;
}

.content-page-gbook .mac_msg_r {
    overflow: hidden;
    border: 1px solid var(--content-border);
    border-radius: 16px;
    background: linear-gradient(145deg, #26272d, #202126);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .2);
}

.content-page-gbook .mac_msg_r .msg_tit {
    width: auto;
    margin: 0;
    padding: 18px 22px;
    border-bottom: 1px solid var(--content-border);
    color: var(--content-text);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.content-page-gbook .mac_msg_r .gbook_form {
    padding: 22px;
}

.content-page-gbook .msg_cue {
    margin: 0 0 10px;
    color: var(--content-muted);
}

.content-page-gbook .gbook_content {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 128px;
    min-height: 128px;
    padding: 14px 16px;
    border: 1px solid var(--content-border);
    border-radius: 12px;
    outline: none;
    resize: vertical;
    background: #303138;
    color: var(--content-text);
    font: inherit;
    line-height: 1.6;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.content-page-gbook .gbook_content:focus,
.content-page-gbook .mac_verify:focus {
    border-color: var(--content-accent);
    box-shadow: 0 0 0 3px rgba(251, 192, 74, .13);
}

.content-page-gbook .msg_code {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 10px 0;
    color: var(--content-muted);
}

.content-page-gbook .msg_code .mac_verify {
    width: 90px;
    height: 36px;
    padding: 0 9px;
    border: 1px solid var(--content-border);
    border-radius: 8px;
    outline: none;
    background: #303138;
    color: var(--content-text);
}

.content-page-gbook .msg_code .mac_verify_img {
    height: 36px;
    border-radius: 6px;
}

.content-page-gbook .remaining-w {
    margin-left: auto;
    color: var(--content-muted);
    font-size: 13px;
}

.content-page-gbook .gbook_remaining {
    margin: 0 3px;
    color: var(--content-accent);
    font-weight: 700;
}

.content-page-gbook .gbook_submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 42px;
    margin: 0;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffd36c, #f4b631);
    color: var(--content-accent-dark);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}

.content-page-gbook .gbook_submit:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.content-page-gbook .mac_msg_item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid var(--content-border);
    border-radius: 14px;
    background: var(--content-panel);
}

.content-page-gbook .mac_msg_l .msg_tag,
.content-page-gbook .mac_msg_l .msg_list {
    float: none;
    width: auto;
    margin: 0;
}

.content-page-gbook .mac_msg_l .msg_tag {
    height: max-content;
    overflow: hidden;
    border-radius: 10px;
}

.content-page-gbook .mac_msg_l .count_bg {
    height: 4px;
    background: linear-gradient(90deg, #f25f4d, #fdcd34, #59b84b, #30a1d9);
}

.content-page-gbook .mac_msg_l .msg_count {
    padding: 10px 4px;
    background: #303138;
    color: var(--content-muted);
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
}

.content-page-gbook .mac_msg_l .msg_count strong {
    display: block;
    color: var(--content-accent);
}

.content-page-gbook .mac_msg_l .msg_reply,
.content-page-gbook .mac_msg_l .reply_answer {
    position: relative;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--content-border);
    border-radius: 10px;
    background: var(--content-panel-soft);
}

.content-page-gbook .mac_msg_l .reply_answer {
    margin-top: 10px;
    border-color: rgba(251, 192, 74, .25);
    background: rgba(251, 192, 74, .06);
}

.content-page-gbook .msg_title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 7px;
    color: var(--content-muted);
    font-size: 13px;
    line-height: 1.5;
}

.content-page-gbook .msg_title .time {
    float: none;
    color: #85858b;
    white-space: nowrap;
}

.content-page-gbook .msg_cont {
    padding: 0;
    color: #dedee1;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.content-page-gbook .mac_pages {
    margin-top: 8px;
    padding: 14px 0;
}

/* Latest updates */
.content-page-map #qire-lasted {
    overflow: hidden;
    border: 1px solid var(--content-border);
    border-radius: 16px;
    background: var(--content-panel);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .2);
}

.content-page-map #qire-lasted .ui-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 18px;
    border-bottom: 1px solid var(--content-border);
    background: linear-gradient(145deg, #292a31, #23242a);
}

.content-page-map #qire-lasted .ui-title h2 {
    margin: 0;
    overflow: hidden;
    color: var(--content-text);
    font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-page-map #qire-lasted .ui-cnt {
    width: auto;
    padding: 14px 14px 18px;
    overflow: visible;
    background: transparent;
}

.content-page-map #qire-lasted .lasted-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 16px 12px;
    width: 100%;
    overflow: visible;
    background: transparent;
}

/* Legacy site-wide style.css still ships fixed-size rules for any <li>
   inside .lasted-list (e.g. width:1280px / height:44px on PC, width:90%
   / height:2.5rem on WAP), left over from the old table-row layout. Those
   rules are lower specificity but set properties this block never touched,
   so they were leaking through and breaking the card grid (huge fixed-size
   boxes with the real card content only occupying a small top-left
   corner). Reset every box-model property here explicitly. */
.content-page-map #qire-lasted .lasted-list li.map-card {
    box-sizing: border-box;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    line-height: normal;
    text-align: left;
    background: transparent;
    list-style: none;
}

.content-page-map .map-card-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.content-page-map .map-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: var(--content-panel-soft);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
    transition: box-shadow .25s ease;
}

.content-page-map .map-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.content-page-map .map-card-link:hover .map-thumb {
    box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
}

.content-page-map .map-card-link:hover .map-thumb img {
    transform: scale(1.05);
}

.content-page-map .map-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.content-page-map .map-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--content-text);
    font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.content-page-map .map-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.content-page-map .map-badge {
    flex: none;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(251, 192, 74, .14);
    color: var(--content-accent);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.6;
    text-decoration: none;
    white-space: nowrap;
}

.content-page-map .map-area {
    min-width: 0;
    overflow: hidden;
    color: var(--content-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-page-map .map-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    color: #85858b;
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
}

.content-page-map .map-progress {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-page-map .map-time {
    flex: none;
    color: #6f6f76;
}

@media (min-width: 560px) {
    .content-page-map #qire-lasted .lasted-list {
        grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
        gap: 18px 14px;
    }
}

@media (min-width: 901px) {
    .content-page-map #qire-lasted .ui-title {
        height: 60px;
        padding: 0 24px;
    }

    .content-page-map #qire-lasted .ui-title h2 {
        font-size: 18px;
    }

    .content-page-map #qire-lasted .ui-cnt {
        padding: 22px 24px 26px;
    }

    .content-page-map #qire-lasted .lasted-list {
        grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
        gap: 24px 20px;
    }

    .content-page-map .map-title {
        font-size: 14.5px;
    }

    .content-page-map .map-badge {
        font-size: 11px;
    }

    .content-page-map .map-area,
    .content-page-map .map-status {
        font-size: 11.5px;
    }
}

.content-page-map .tipInfo_1 {
    display: none !important;
}

@media (max-width: 900px) {
    .content-page .wrap_ff,
    .content-page #qire-lasted {
        width: calc(100% - 20px);
        margin: 16px auto 28px;
    }

    .content-page-gbook .reply_box {
        gap: 14px;
        margin: 0;
    }

    .content-page-gbook .mac_msg_r .msg_tit {
        height: auto;
        padding: 14px 16px;
        font-size: 17px;
        line-height: 1.3;
    }

    .content-page-gbook .mac_msg_r .gbook_form {
        padding: 16px;
    }

    .content-page-gbook .gbook_content {
        height: 116px;
        min-height: 116px;
    }

    .content-page-gbook .gbook_submit {
        width: 100%;
        height: 44px;
        border-radius: 10px;
        font-size: 15px;
        line-height: 44px;
    }

    .content-page-gbook .mac_msg_l {
        padding-top: 0;
    }

    .content-page-gbook .mac_msg_item {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
        height: auto;
        min-height: 0;
        margin-bottom: 10px;
        padding: 12px;
    }

    .content-page-gbook .mac_msg_l .msg_tag {
        width: 48px;
        height: auto;
        margin: 0;
        border-radius: 8px;
    }

    .content-page-gbook .mac_msg_l .msg_list {
        width: auto;
    }

    .content-page-gbook .msg_title {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        height: auto;
        margin-bottom: 6px;
        line-height: 1.4;
    }

    .content-page-gbook .msg_cont {
        height: auto;
        min-height: 0;
        padding: 0;
        font-size: 14px;
        line-height: 1.65;
    }

}

@media (max-width: 420px) {
    .content-page-gbook .msg_code {
        flex-wrap: wrap;
    }

    .content-page-gbook .remaining-w {
        flex-basis: 100%;
        margin-left: 0;
    }
}
/* Dedicated mobile header for guestbook and latest updates */
.content-page-mobile .content-mobile-header {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    width: 100%;
    height: 56px;
    min-height: 56px;
    padding: 0;
    background: rgba(25, 26, 32, .96);
    border-bottom: 1px solid var(--content-border);
    line-height: normal;
}

.content-page-mobile .content-mobile-header .content-header-home,
.content-page-mobile .content-mobile-header .content-header-menu {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 56px;
    padding: 0;
    margin: 0;
    color: #fff;
}

.content-page-mobile .content-mobile-header .content-header-home svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.content-page-mobile .content-mobile-header .content-header-title {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--content-text);
    font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-page-mobile .content-mobile-header .content-header-menu {
    cursor: pointer;
}

.content-page-mobile .content-mobile-header .content-header-menu .i_bread {
    display: block;
    width: 24px;
    height: 22px;
    padding: 0;
    overflow: visible;
}

.content-page-mobile .content-mobile-header .content-header-menu .i_bread::before,
.content-page-mobile .content-mobile-header .content-header-menu .i_bread span::before,
.content-page-mobile .content-mobile-header .content-header-menu .i_bread span::after {
    width: 22px;
    height: 2px;
}

@media (max-width: 600px) {
    .content-page-gbook .msg_code label {
        display: flex;
        flex: 1 1 180px;
        align-items: center;
        gap: 7px;
        min-width: 0;
    }

    .content-page-gbook .msg_code .mac_verify {
        flex: 1 1 auto;
        min-width: 72px;
        max-width: 120px;
    }

    .content-page-gbook .msg_title strong,
    .content-page-gbook .msg_title .time {
        min-width: 0;
    }

    .content-page-gbook .msg_cont {
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

}

@media (max-width: 380px) {
    .content-page-gbook .msg_title {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .content-page-gbook .msg_title .time {
        white-space: normal;
    }

}

/* H5 alignment with the main project header and content rhythm */
.content-page-mobile {
    --content-bg: #191a20;
    --content-panel: #222328;
    --content-panel-soft: #292a31;
    --content-border: #33343b;
    --content-text: #f2f2f3;
    --content-muted: #a9a9ae;
    --content-accent: #fbc04a;
}

.content-page-mobile .content-mobile-header {
    grid-template-columns: minmax(0, 1fr) 52px;
    background: #191a20;
}

.content-page-mobile .content-mobile-header .content-header-title {
    padding-left: 52px;
}

.content-page-mobile .content-mobile-header .content-header-menu {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 56px;
    margin: 0;
    padding: 0;
    background: none;
}

.content-page-mobile .content-mobile-header .content-header-menu .i_user {
    display: block;
    width: 28px;
    height: 28px;
    margin: 0;
}

@media (max-width: 900px) {
    .content-page-gbook .mac_msg_item {
        display: block;
        width: 100%;
        overflow: hidden;
    }

    .content-page-gbook .mac_msg_l .msg_tag {
        display: inline-block;
        width: auto;
        max-width: 100%;
        margin: 0 0 10px;
        vertical-align: top;
    }

    .content-page-gbook .mac_msg_l .count_bg {
        width: 100%;
    }

    .content-page-gbook .mac_msg_l .msg_count {
        display: flex;
        align-items: center;
        gap: 3px;
        padding: 6px 10px;
        white-space: nowrap;
    }

    .content-page-gbook .mac_msg_l .msg_count strong {
        display: inline;
    }

    .content-page-gbook .mac_msg_l .msg_list,
    .content-page-gbook .mac_msg_l .msg_reply,
    .content-page-gbook .mac_msg_l .reply_answer {
        display: block;
        float: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 0;
        clear: both;
    }

    .content-page-gbook .mac_msg_l .msg_reply::before,
    .content-page-gbook .mac_msg_l .msg_reply::after,
    .content-page-gbook .mac_msg_l .reply_answer::before,
    .content-page-gbook .mac_msg_l .reply_answer::after {
        content: none !important;
        display: none !important;
    }

    .content-page-gbook .msg_title,
    .content-page-gbook .msg_cont,
    .content-page-gbook .msg_title strong,
    .content-page-gbook .msg_title .time {
        position: static;
        float: none;
        width: auto;
        max-width: 100%;
        height: auto;
        overflow: visible;
    }

    .content-page-gbook .msg_title {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 6px 10px;
    }

    .content-page-gbook .msg_title .time {
        color: #8e8e8e;
        font-size: 11px;
        line-height: 1.5;
        text-align: right;
        white-space: nowrap;
    }

}

@media (max-width: 380px) {
    .content-page-mobile .content-mobile-header .content-header-title {
        padding-left: 44px;
        font-size: 16px;
    }

    .content-page-mobile .content-mobile-header {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    .content-page-mobile .content-mobile-header .content-header-menu {
        width: 44px;
    }

    .content-page-gbook .msg_title {
        display: block;
    }

    .content-page-gbook .msg_title .time {
        display: block;
        margin-top: 2px;
        text-align: left;
        white-space: normal;
    }

}

