@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700;800&family=Noto+Serif+TC:wght@600;700;900&display=swap");
@import url("favorites.css");
:root {
    --ink: #26322c;
    --muted: #6d756f;
    --paper: #fffdf8;
    --cream: #f7f2e8;
    --green: #315d4b;
    --terra: #c96f4b;
    --line: #ded8cd;
    --shadow: 0 14px 40px rgba(44, 58, 49, 0.1);
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Noto Sans TC", sans-serif;
}
a {
    color: inherit;
    text-decoration: none;
}
button,
input,
select,
textarea {
    font: inherit;
}
.container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 253, 248, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 30px;
}
.logo {
    font-family: "Noto Serif TC";
    font-size: 22px;
    font-weight: 900;
    margin-right: auto;
}
.logo i {
    font-style: normal;
    background: var(--terra);
    color: #fff;
    border-radius: 50%;
    padding: 5px;
    margin-right: 8px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 14px;
    font-weight: 700;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--terra);
}
.home-link {
    border: 1px solid var(--terra);
    background: var(--terra);
    color: #fff;
    padding: 9px 14px;
    border-radius: 99px;
}
.page-hero {
    padding: 75px 0 55px;
    background: var(--cream);
}
.eyebrow {
    color: var(--terra);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.page-hero h1,
.section h2 {
    font-family: "Noto Serif TC";
    margin: 10px 0;
}
.page-hero h1 {
    font-size: 52px;
}
.page-hero p,
.muted {
    color: var(--muted);
    line-height: 1.8;
}
.section {
    padding: 65px 0;
}
.section.alt {
    background: var(--cream);
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 24px;
}
.section h2 {
    font-size: 34px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.grid.two {
    grid-template-columns: repeat(2, 1fr);
}
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
}
.card h3 {
    margin: 7px 0;
}
.card p {
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}
.visual {
    height: 170px;
    border-radius: 14px;
    background: #dce7dc;
    display: grid;
    place-items: center;
    font-size: 70px;
    margin-bottom: 15px;
}
.price {
    font-weight: 800;
    color: var(--green);
}
.btn {
    border: 0;
    border-radius: 99px;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
}
.primary {
    background: var(--green);
    color: #fff;
}
.light {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--green);
}
.tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.tools input,
.tools select,
.field input,
.field textarea,
.field select {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 15px;
    background: #fff;
}
.tools input {
    min-width: 280px;
}
.field {
    display: grid;
    gap: 7px;
    margin-bottom: 15px;
}
.field label {
    font-size: 13px;
    font-weight: 700;
}
.field textarea {
    min-height: 100px;
}

/* Creator/admin protected-area sign in */
.role-access-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(32, 28, 24, 0.48);
    backdrop-filter: blur(3px);
}
.role-access-modal.open {
    display: grid;
}
.role-access-dialog {
    position: relative;
    width: min(430px, 100%);
    padding: 36px;
    border-radius: 22px;
    background: #fffdf9;
    box-shadow: 0 24px 70px rgba(39, 31, 25, 0.22);
}
.role-access-dialog h2 {
    margin: 6px 0 8px;
}
.role-access-dialog > p {
    margin: 0 0 24px;
    color: #716a63;
}
.role-access-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #554e48;
    font-size: 26px;
    cursor: pointer;
}
.role-access-dialog .btn {
    width: 100%;
    justify-content: center;
}
.role-access-error {
    min-height: 20px;
    margin: -8px 0 12px;
    color: #a33e31;
    font-size: 0.88rem;
}
.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px;
}
.table-wrap {
    overflow: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th,
.data-table td {
    text-align: left;
    padding: 13px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.data-table th {
    font-size: 12px;
    color: var(--muted);
}
.tag {
    display: inline-block;
    background: #e6efe9;
    color: var(--green);
    padding: 5px 9px;
    border-radius: 99px;
    font-size: 12px;
}
.rank {
    display: grid;
    grid-template-columns: 40px 50px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.creator-directory-heading,
.creator-directory-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}
.creator-directory-heading {
    margin-bottom: 30px;
}
.creator-directory-heading h2 {
    margin: 4px 0 0;
    font-size: 34px;
}
.creator-directory-toolbar {
    padding: 16px 0;
    border-top: 1px solid var(--line);
}
.creator-directory-toolbar p {
    margin: 0;
    color: var(--muted);
}
.creator-sort {
    display: flex;
    gap: 7px;
    align-items: center;
}
.creator-sort button {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 9px 14px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.creator-sort button.active {
    border-color: var(--line);
    background: #fff;
    color: var(--green);
    box-shadow: 0 4px 14px rgba(38, 53, 43, 0.09);
    font-weight: 800;
}
.creator-directory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.creator-directory-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(42, 47, 43, 0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.creator-page-hero {
    padding: 42px 0 48px;
    background: var(--cream);
}
.creator-page-profile {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 28px;
    align-items: center;
    margin-top: 26px;
}
.creator-page-profile h1 { margin: 6px 0 12px; font-size: 42px; }
.creator-page-profile p { margin: 0; color: var(--muted); }
.creator-page-avatar {
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #fff;
    font-size: 68px;
    box-shadow: 0 8px 24px rgba(42,47,43,.1);
}
.creator-page-avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator-story-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 54px; align-items: start; }
.creator-story-layout h2 { margin: 6px 0 10px; font-size: 32px; }
.creator-story-display { min-height: 150px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--muted); line-height: 2; white-space: pre-wrap; }
.creator-custom-order { display:grid;grid-template-columns:.75fr 1.25fr;gap:48px;align-items:start; }
.creator-custom-order h2 { margin:6px 0 10px;font-size:32px; }
.creator-custom-form { display:grid;gap:18px;padding:28px; }
.creator-custom-form .grid { gap:16px; }
.creator-custom-form .field { display:grid;gap:7px; }
.creator-custom-form label { font-weight:700; }
.creator-custom-form input,.creator-custom-form textarea { width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#fff; }
.creator-custom-form textarea { resize:vertical; }
.creator-custom-form .btn { justify-self:start; }
.favorite-creator-page { margin-top: 18px; border: 1px solid var(--green); background: #fff; color: var(--green); }
.favorite-creator-page.active { background: var(--green); color: #fff; }
.creator-work-card { cursor: pointer; }
.creator-published-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:24px; }
.creator-published-grid .product-card { display:flex;flex-direction:column;min-height:455px;padding:22px;transition:transform .2s ease,box-shadow .2s ease; }
.creator-published-grid .product-card:hover { transform:translateY(-4px);box-shadow:var(--shadow); }
.creator-published-grid .product-card:focus-visible { outline:3px solid var(--terra);outline-offset:3px; }
.creator-published-grid .product-card .visual { position:relative;width:100%;height:auto;min-height:0;aspect-ratio:3/4;margin-bottom:15px;overflow:hidden; }
.creator-published-grid .product-card .visual.product-photo { padding:0;background:transparent!important; }
.creator-published-grid .product-card .visual.product-photo img { position:absolute;inset:0;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;display:block;object-fit:cover!important;object-position:center!important;border-radius:inherit; }
.creator-published-grid .product-card h3 { min-height:34px;margin:14px 0 5px;font-family:"Noto Sans TC","Microsoft JhengHei",sans-serif;font-size:22px;line-height:1.4;font-weight:800;letter-spacing:.01em; }
.creator-work-favorite { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--terra); font-size: 20px; cursor: pointer; }
.creator-work-favorite.active { background: var(--terra); color: #fff; }
@media (max-width: 700px) {
    .creator-page-profile, .creator-story-layout, .creator-custom-order { grid-template-columns: 1fr; }
    .creator-page-profile { text-align: center; }
    .creator-page-avatar { margin: auto; }
}
.creator-directory-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.creator-directory-cover {
    position: relative;
    width: calc(100% - 30px);
    height: auto;
    aspect-ratio: 3 / 4;
    margin: 15px 15px 0;
    overflow: hidden;
    border-radius: 13px;
    background: var(--cream);
}
.creator-directory-cover > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}
.creator-art {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #e9dbc7, #f7f1e8);
}
.creator-art-1 { background: linear-gradient(145deg, #d8e4dc, #f1e7d8); }
.creator-art-2 { background: linear-gradient(145deg, #d8c7b4, #ece4d7); }
.creator-art-3 { background: linear-gradient(145deg, #d7e3e6, #eee1cf); }
.creator-art-4 { background: linear-gradient(145deg, #dce9d3, #f1e3db); }
.creator-art span { font-size: 92px; filter: drop-shadow(0 10px 12px rgba(40,40,35,.12)); }
.creator-art small { position:absolute;bottom:16px;letter-spacing:.12em;color:var(--muted); }
.creator-card-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: var(--terra);
    font-size: 21px;
    cursor: pointer;
}
.creator-card-favorite.active { background: var(--terra); color: #fff; }
.creator-directory-body { display:flex;flex-direction:column;padding:16px 20px 20px;text-align:center; }
.creator-directory-body h3 {
    margin: 0 0 16px;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.01em;
}
.creator-card-tags { display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin:0 0 12px; }
.creator-card-tags span { padding:5px 8px;border-radius:5px;background:#edf0ed;color:#607166;font-size:11px;font-weight:700; }
.creator-contact-button { width:100%;margin-top:4px;padding:10px;border:1px solid var(--green);border-radius:999px;background:#fff;color:var(--green);font-weight:800;cursor:pointer; }
.creator-contact-button:hover { background:var(--green);color:#fff; }
.creator-directory-empty { grid-column:1/-1;padding:70px;text-align:center;color:var(--muted); }
.avatar {
    width: 48px;
    height: 48px;
    background: var(--cream);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 25px;
}
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tabs button {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 99px;
    padding: 9px 14px;
    cursor: pointer;
}
.tabs button.active {
    background: var(--green);
    color: #fff;
}
.notice {
    position: fixed;
    left: 50%;
    bottom: 25px;
    transform: translate(-50%, 20px);
    opacity: 0;
    background: #26322c;
    color: #fff;
    padding: 11px 18px;
    border-radius: 99px;
    transition: 0.2s;
}
.notice.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
footer {
    background: #202c26;
    color: #dfe6e1;
    text-align: center;
    padding: 28px;
    margin-top: 30px;
}
@media (max-width: 850px) {
    .nav-inner {
        height: auto;
        padding: 15px 0;
        flex-wrap: wrap;
    }
    .nav-links {
        order: 3;
        width: 100%;
        overflow: visible;
        flex-wrap: wrap;
        padding-bottom: 5px;
    }
    .grid {
        grid-template-columns: 1fr 1fr;
    }
    .page-hero h1 {
        font-size: 42px;
    }
}
@media (max-width: 560px) {
    .grid,
    .grid.two {
        grid-template-columns: 1fr;
    }
    .section-head {
        display: block;
    }
    .tools {
        margin-top: 15px;
    }
    .tools input {
        min-width: 100%;
        width: 100%;
    }
    .page-hero {
        padding: 50px 0;
    }
    .page-hero h1 {
        font-size: 36px;
    }
}

.nav-inner {
    height: 96px;
}
.logo {
    font-size: 27px;
}
.logo i {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 22px;
}
.nav-links {
    gap: 30px;
    font-size: 18px;
}
.home-link {
    font-size: 16px;
    padding: 11px 17px;
}
@media (max-width: 850px) {
    .nav-inner {
        height: auto;
        min-height: 86px;
    }
    .nav-links {
        font-size: 16px;
        gap: 22px;
    }
}
@media (max-width: 560px) {
    .logo {
        font-size: 21px;
    }
    .logo i {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    .home-link {
        font-size: 14px;
        padding: 9px 13px;
    }
}

/* 商品上傳圖一律完整縮放至固定圖片框，不裁切內容 */
#products .product-card .visual.product-photo img,
.creator-published-grid .visual.product-photo img,
.detail-product-visual img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}
.visual.product-photo {
    height: 240px;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
    background: #f1eee7;
}
.visual.product-photo img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    display: block;
    margin: auto;
    object-fit: contain;
    object-position: center;
    border-radius: inherit;
}
.product-card:target {
    outline: 3px solid var(--terra);
    outline-offset: 5px;
    box-shadow: var(--shadow);
    scroll-margin-top: 120px;
}
.rank .avatar.creator-image {
    overflow: hidden;
}
.rank .avatar.creator-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 35%;
}
.rank small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}
.rank strong:last-child {
    color: var(--green);
}
.site-footer {
    background: #202c26;
    color: #dfe6e1;
    text-align: left;
    padding: 55px 0 25px;
    margin-top: 30px;
}
.creator-page + .site-footer {
    margin-top: 0;
}
.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 45px;
}
.site-footer .footer-brand {
    font-family: "Noto Serif TC";
    font-size: 27px;
    font-weight: 900;
    color: #dfe6e1;
    display: inline-flex;
    align-items: center;
}
.site-footer .footer-brand i {
    font-style: normal;
    background: var(--terra);
    color: #fff;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-right: 8px;
    font-size: 22px;
}
.site-footer p,
.site-footer a {
    color: #aebbb3;
    font-size: 14px;
}
.site-footer p {
    line-height: 1.8;
}
.site-footer h4 {
    margin: 0 0 20px;
    color: #f1f4f2;
}
.site-footer .footer-links a {
    display: block;
    margin: 10px 0;
    transition: color 0.2s;
}
.site-footer .footer-links a:hover {
    color: #fff;
}
.site-footer .copyright {
    border-top: 1px solid #3a4941;
    margin-top: 35px;
    padding-top: 20px;
    color: #84938b;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--terra);
    color: #fff;
    box-shadow: 0 8px 24px rgba(22, 34, 28, 0.28);
    cursor: pointer;
    font-size: 22px;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition:
        opacity 0.2s,
        transform 0.2s,
        visibility 0.2s;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.back-to-top:hover {
    background: #b85f3c;
    transform: translateY(-2px);
}
.nav-links a,
.home-link {
    display: inline-block;
    transform-origin: center;
    transition:
        color 0.18s ease,
        transform 0.14s ease;
}
.nav-links a:hover,
.home-link:hover {
    transform: scale(1.025);
}
.home-link:hover {
    background: #a95335;
    color: #fff;
}
.nav-links a:active,
.home-link:active {
    transform: scale(1.06);
}
.nav-group {
    position: relative;
}
.nav-group > a:first-child {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.nav-group > a:first-child::after {
    content: "⌄";
    font-size: 12px;
    color: var(--muted);
    transition: transform 0.2s, color 0.2s;
}
.nav-group:hover > a:first-child::after,
.nav-group:focus-within > a:first-child::after {
    transform: rotate(180deg);
    color: var(--terra);
}
.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -18px;
    z-index: 40;
    min-width: 170px;
    padding: 9px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
    display: block;
}
.nav-menu a {
    display: block;
    padding: 9px 11px;
    border-radius: 8px;
    white-space: nowrap;
    transform-origin: left center;
}
.nav-menu a:hover {
    background: var(--cream);
    transform: scale(1.035);
}
.nav-menu a:active {
    transform: scale(1.06);
}
@media (max-width: 850px) {
    .nav { overflow:visible; }
    .nav-links { overflow:visible; flex-wrap:wrap; gap:12px 18px; padding-bottom:8px; }
    .nav-links > a, .nav-group > a:first-child { white-space:nowrap; }
    .nav-group { flex:0 0 auto; }
    .nav-menu { left:0; max-width:calc(100vw - 32px); }
    .nav-menu a { white-space:normal; overflow-wrap:anywhere; }
}
.product-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 32px;
}
.product-filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px;
    gap: 12px;
    max-width: 650px;
    margin: 0 0 28px auto;
}
.product-search {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 15px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
}
.product-search input {
    width: 100%;
    padding: 13px 0;
    border: 0;
    outline: 0;
    background: transparent;
}
.product-filter-bar select {
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}
.product-filter-bar:focus-within .product-search {
    border-color: var(--terra);
}
.product-empty {
    grid-column: 1 / -1;
    padding: 70px 20px;
    text-align: center;
    color: var(--muted);
}
.product-pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.14s;
}
.product-pagination button:hover:not(:disabled) {
    background: var(--cream);
    transform: scale(1.04);
}
.product-pagination button.active {
    background: var(--terra);
    color: #fff;
}
.product-pagination button:disabled {
    cursor: default;
    color: #aaa;
}
#products .product-card {
    display: flex;
    flex-direction: column;
    min-height: 455px;
    padding: 22px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#products .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
#products .product-card:focus-visible {
    outline: 3px solid var(--terra);
    outline-offset: 3px;
}
#products .product-card .visual,
#products .product-card .visual.product-photo {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    margin-bottom: 15px;
    overflow: hidden;
}
.product-rank-overlay {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 5px;
    background: #fff2ed;
    color: var(--terra);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(42, 47, 43, 0.1);
}
#products .product-card .visual.product-photo {
    padding: 0;
    background: transparent !important;
}
#products .product-card .visual.product-photo img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: none;
    height: 100% !important;
    max-height: none;
    display: block;
    margin: 0;
    object-fit: cover !important;
    object-position: center;
    border-radius: inherit;
}
#products .product-card .visual.product-photo .product-rank-overlay {
    right: 8px;
    bottom: 8px;
}
#products .product-card .tag {
    align-self: flex-start;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 700;
}
.product-badges {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.popularity-tag {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 99px;
    background: #f4dfd5;
    color: #a95335;
    font-size: 14px;
    font-weight: 800;
}
#products .product-card h3 {
    min-height: 34px;
    margin: 14px 0 5px;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    font-size: 22px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: 0.01em;
}
#products .product-card > p:not(:last-child) {
    min-height: 25px;
    margin: 7px 0 10px;
    font-size: 15px;
}
.product-purchase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    margin-top: auto;
    padding-top: 14px;
}
.product-purchase-row .price {
    flex-shrink: 0;
    color: var(--green);
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
}
.product-purchase-row .btn {
    padding: 13px 19px;
    font-size: 15px;
    white-space: nowrap;
}
.product-detail-page {
    padding: 64px 0;
}
.product-detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 56px;
    align-items: start;
    padding: 38px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.detail-product-visual {
    position: relative;
    height: 560px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--cream);
    border-radius: 20px;
    font-size: 150px;
}
.detail-product-visual img {
    position: absolute;
    inset: 0;
    display: block;
    min-width: 0;
    min-height: 0;
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}
.detail-product-copy h1 {
    margin: 10px 0 6px;
    font-family: 'Noto Serif TC';
    font-size: 42px;
}
.detail-maker-name {
    color: var(--muted);
}
.detail-price {
    display: block;
    margin: 24px 0;
    color: var(--terra);
    font-size: 30px;
    font-weight: 900;
}
.detail-description {
    color: var(--muted);
    line-height: 1.9;
}
.product-custom-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 13px;
    margin: 18px 0 22px;
}
.product-custom-tags span {
    color: var(--terra);
    font-size: 14px;
    line-height: 1.5;
}
.detail-actions {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    margin-top: 28px;
}

.creator-chat {
    position: fixed;
    top: 50%;
    right: 24px;
    bottom: auto;
    z-index: 5000;
    width: min(400px, calc(100vw - 32px));
    height: min(610px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(35, 42, 36, 0.24);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(110%, -50%);
    transform-origin: right center;
    transition: 0.2s ease;
}
.creator-chat.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, -50%);
}
.creator-chat-header {
    display: grid;
    grid-template-columns: 46px 1fr 36px;
    gap: 11px;
    align-items: center;
    padding: 16px 17px;
    background: var(--green);
    color: #fff;
}
.creator-chat-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #eef2e9;
    font-size: 24px;
}
.creator-chat-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}
.creator-chat-header strong,
.creator-chat-header small {
    display: block;
}
.creator-chat-header small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
}
.creator-chat-header button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}
.creator-chat-product {
    display: flex;
    gap: 8px;
    padding: 10px 17px;
    border-bottom: 1px solid var(--line);
    background: #faf7f1;
    font-size: 12px;
}
.creator-chat-product span {
    color: var(--muted);
}
.creator-chat-messages {
    flex: 1;
    min-height: 220px;
    padding: 16px;
    overflow-y: auto;
    background: #f8f7f3;
}
.creator-chat-welcome {
    max-width: 86%;
    padding: 11px 13px;
    border-radius: 4px 15px 15px;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    box-shadow: 0 2px 8px rgba(30, 40, 32, 0.06);
}
.creator-chat-message {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 10px;
}
.creator-chat-message span {
    max-width: 82%;
    padding: 10px 13px;
    border-radius: 15px 4px 15px 15px;
    background: var(--green);
    color: #fff;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.creator-chat-message small {
    margin-top: 4px;
    color: #999;
    font-size: 10px;
}
.creator-chat-message.received {
    align-items: flex-start;
}
.creator-chat-message.received span {
    border-radius: 4px 15px 15px 15px;
    background: #e8ede9;
    color: var(--green);
}
.creator-chat-form {
    display: grid;
    grid-template-columns: 1fr 42px;
    gap: 9px;
    align-items: end;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: #fff;
}
.creator-chat-form textarea {
    max-height: 90px;
    resize: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
}
.creator-chat-form button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--terra);
    color: #fff;
    cursor: pointer;
}
.favorite-button {
    min-width: 52px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--terra);
    font-size: 22px;
}
.favorite-button.active {
    background: #f7e5de;
    border-color: var(--terra);
}
.favorite-button.favorite-icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 28px;
    line-height: 1;
}
.favorite-button.favorite-icon-only:hover {
    background: #f7e5de;
}
.favorite-button.favorite-icon-only:focus-visible {
    outline: 2px solid var(--terra);
    outline-offset: 2px;
}
.order-row {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}
.order-row select {
    width: 90px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.order-row .btn {
    flex: 1;
}
.creator-profile-panel {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 22px;
    align-items: center;
    margin-top: 30px;
    padding: 30px;
    background: var(--cream);
    border-radius: 22px;
}
.creator-profile-avatar {
    position: relative;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dce7dc;
    font-size: 42px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.creator-profile-avatar:hover,
.creator-profile-avatar:focus-visible {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 24px rgba(54, 75, 63, .18);
    outline: 3px solid rgba(201, 111, 75, .25);
    outline-offset: 3px;
}
.creator-directory-card-target {
    border-color: var(--terra);
    box-shadow: 0 0 0 4px rgba(201, 111, 75, .16), 0 18px 38px rgba(49, 64, 55, .16);
}
.creator-profile-panel h2 {
    margin: 0 0 5px;
    font-family: 'Noto Serif TC';
}
.creator-profile-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}
.publish-modal {
    overscroll-behavior:none;
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(25, 35, 30, 0.58);
    backdrop-filter: blur(5px);
}
.publish-modal.open {
    display: grid;
}
.publish-dialog {
    overscroll-behavior:contain;
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 34px;
    background: var(--paper);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(20, 30, 25, 0.3);
}
.publish-dialog h2 {
    margin: 7px 0 24px;
    font-family: 'Noto Serif TC';
    font-size: 32px;
}
.publish-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--cream);
    color: var(--ink);
    cursor: pointer;
    font-size: 24px;
}
.publish-dialog .field small {
    color: var(--muted);
    line-height: 1.6;
}
@media (max-width: 850px) {
    .creator-directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .creator-published-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .creator-directory-heading,
    .creator-directory-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .product-detail-shell {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .detail-product-visual {
        height: 440px;
    }
}
@media (max-width: 560px) {
    .creator-directory-grid {
        grid-template-columns: 1fr;
    }
    .creator-published-grid { grid-template-columns:1fr; }
    .creator-sort {
        width: 100%;
        overflow-x: auto;
    }
    .creator-sort button {
        white-space: nowrap;
    }
    .creator-directory-cover { aspect-ratio: 3 / 4; }
    .creator-chat {
        top: auto;
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        height: min(560px, calc(100vh - 24px));
        transform: translateY(110%);
    }
    .creator-chat.open {
        transform: none;
    }
    .product-filter-bar {
        grid-template-columns: 1fr;
        max-width: none;
    }
    .product-detail-page {
        padding: 30px 0;
    }
    .product-detail-shell {
        padding: 20px;
    }
    .detail-product-visual {
        height: 360px;
    }
    .detail-product-copy h1 {
        font-size: 34px;
    }
    .creator-profile-panel {
        grid-template-columns: 65px 1fr;
        padding: 22px;
    }
    .creator-profile-avatar {
        width: 65px;
        height: 65px;
        font-size: 30px;
    }
    .creator-profile-panel .favorite-button {
        grid-column: 1 / -1;
        width: 100%;
    }
}
@media (max-width: 850px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 560px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .site-footer .copyright {
        display: block;
        line-height: 2;
    }
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

.creator-published-grid .visual.product-photo img,
.detail-product-visual img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}

.product-management-toolbar { display:flex; flex-wrap:wrap; gap:12px; margin:20px 0; }
.product-management-toolbar input { flex:1; min-width:180px; }
.product-management-toolbar input, .product-management-toolbar select { padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--paper); }
.managed-product-name { display:flex; align-items:center; gap:12px; min-width:180px; }
.managed-product-name img { width:60px; height:70px; object-fit:cover; border-radius:8px; }
.managed-product-name small { display:block; color:var(--muted); margin-top:4px; }
#publishPreview { display:block; max-width:100%; max-height:200px; margin-top:12px; border-radius:10px; }
#publishPreview[hidden] { display:none; }
.detail-product-visual.has-product-photo {
    display:block;
    height:auto;
    min-height:0;
    aspect-ratio:3 / 4;
    align-self:start;
}
.detail-product-visual.has-product-photo img {
    position:absolute;
    inset:0;
    width:100% !important;
    height:100% !important;
    max-height:none !important;
    object-fit:cover !important;
    object-position:center !important;
}
@media (min-width:851px) {
    .product-detail-shell {
        grid-template-columns:minmax(0,360px) minmax(0,1fr);
        gap:40px;
    }
}
.publish-gallery { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.publish-gallery img { width:90px; height:90px; object-fit:contain; border-radius:8px; background:var(--cream); }
.product-photo-slots { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:10px; }
.product-photo-slot { position:relative; display:flex; flex-direction:column; align-items:stretch; gap:8px; min-width:0; padding:10px; border:1px dashed var(--line); border-radius:12px; background:var(--cream); }
.photo-slot-order { font-size:12px; font-weight:700; color:var(--green); }
#publishGallery .product-photo-slot img { width:100%; height:110px; max-height:none; margin:0; object-fit:contain; border-radius:8px; }
#publishGallery .product-photo-slot img[hidden] { display:none; }
.photo-slot-pick { display:grid!important; place-items:center; min-height:44px; margin:0; padding:8px 4px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--green); cursor:pointer; text-align:center; }
.product-photo-slot input[type=file] { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; padding:0; }
.product-photo-slot:focus-within { outline:2px solid var(--green); outline-offset:2px; }
.photo-slot-remove { min-height:40px; border:1px solid #e3b8b3; border-radius:8px; background:#fff4f2; color:#a83228; cursor:pointer; }
.photo-slot-remove[hidden] { display:none; }
@media (max-width:560px) { .product-photo-slots { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } }
.product-carousel { position:relative; }
.product-card-carousel { position:relative; }
.custom-login-hint { margin:0 0 22px; padding:14px 16px; border:1px solid #e5c5ad; border-radius:10px; background:#fff5e9; color:#805032; font-size:14px; line-height:1.8; }
.custom-login-hint a { display:inline-block; margin-left:8px; font-weight:700; text-decoration:underline; }
.custom-login-hint[hidden] { display:none; }
.product-card-carousel .card-photo-prev,.product-card-carousel .card-photo-next { position:absolute; top:50%; transform:translateY(-50%); z-index:2; display:grid; place-items:center; width:44px; height:44px; border:0; border-radius:12px; padding:0; background:rgba(255,255,255,.92); color:var(--green); font-size:28px; cursor:pointer; }
.product-card-carousel .card-photo-prev { left:8px; }
.product-card-carousel .card-photo-next { right:8px; }
.product-card-carousel .card-photo-count { position:absolute; bottom:10px; left:50%; transform:translateX(-50%); z-index:2; padding:4px 10px; border-radius:20px; background:rgba(255,255,255,.94); color:var(--green); font-size:12px; line-height:1.5; }
.product-carousel .carousel-prev,.product-carousel .carousel-next { position:absolute; top:50%; transform:translateY(-50%); width:42px; height:48px; border:0; border-radius:12px; background:rgba(255,255,255,.9); color:var(--green); font-size:32px; cursor:pointer; }
.product-carousel .carousel-prev { left:12px; }
.product-carousel .carousel-next { right:12px; }
.carousel-controls { position:absolute; bottom:14px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:12px; padding:7px 14px; border-radius:24px; background:rgba(255,255,255,.94); color:var(--green); font-size:14px; }
.product-card-carousel .card-photo-prev,.product-card-carousel .card-photo-next,
.product-carousel .carousel-prev,.product-carousel .carousel-next {
    z-index:3;
    background:transparent; color:#fff; border-radius:0; box-shadow:none;
    text-shadow:0 1px 5px rgba(0,0,0,.85); min-width:44px;
    transition:opacity .2s ease;
}
.product-carousel .carousel-controls,.product-card-carousel .card-photo-dots {
    position:absolute; bottom:12px; left:50%; transform:translateX(-50%);
    display:flex; align-items:center; gap:2px; padding:0; border:0;
    background:transparent; box-shadow:none; z-index:2; transition:opacity .2s ease;
}
.product-photo-dot {
    display:grid; place-items:center; width:26px; height:32px; min-width:26px;
    padding:0; border:0; background:transparent; cursor:pointer;
}
.product-photo-dot::before {
    content:''; width:8px; height:8px; border-radius:50%; background:#fff;
    opacity:.45; box-shadow:0 1px 4px rgba(0,0,0,.65); transition:opacity .2s,transform .2s;
}
.product-photo-dot[aria-current="true"]::before { opacity:1; transform:scale(1.25); }
.product-carousel .carousel-count,.product-card-carousel .card-photo-count {
    position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
    clip-path:inset(50%); white-space:nowrap; border:0;
}
@media (hover:hover) and (pointer:fine) {
    .product-carousel:not(:hover):not(:focus-within) .carousel-prev,
    .product-carousel:not(:hover):not(:focus-within) .carousel-next,
    .product-carousel:not(:hover):not(:focus-within) .carousel-controls,
    .product-card-carousel:not(:hover):not(:focus-within) .card-photo-prev,
    .product-card-carousel:not(:hover):not(:focus-within) .card-photo-next,
    .product-card-carousel:not(:hover):not(:focus-within) .card-photo-dots { opacity:0; pointer-events:none; }
}
#publishError { color:#a83228; }
.creator-profile-avatar img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
#managedCreatorPhotoError { color:#a83228; }

/* Mobile overrides only; desktop layouts retain their existing styles. */
.site-menu-toggle { display:none; }
@media (max-width:900px) {
    .home-simplified .nav-actions .auth-icon:first-child { display:grid; }
    .home-simplified .nav-inner { min-width:0; gap:8px; }
    .home-simplified .logo { min-width:0; margin-right:auto; font-size:clamp(17px,4.8vw,24px); white-space:nowrap; gap:6px; }
    .home-simplified .logo i { flex-shrink:0; }
    .home-simplified .nav-actions { display:flex; flex:0 0 auto; gap:4px; }
    .home-simplified .nav-actions .auth-icon { width:44px; height:44px; }
    .home-simplified .nav-links { max-height:calc(var(--mobile-height,100dvh) - 76px); overflow-y:auto; overscroll-behavior:contain; z-index:50; }
    .home-simplified .nav-links .nav-menu { position:static; max-width:100%; box-shadow:none; }
    .home-simplified .nav-links > a,.home-simplified .nav-group > a { padding:10px 0; }
}
@media (max-width:850px) {
    html { scroll-padding-top:85px; }
    body { overflow-wrap:break-word; }
    .container { max-width:calc(100% - 28px); }
    .grid > *, .grid.two > *, .product-detail-shell > *, .creator-profile-panel > *, .member-layout > * { min-width:0; }
    input:not([type=checkbox]):not([type=radio]),textarea,select { max-width:100%; min-width:0; font-size:16px; }
    button,a,input,select,textarea { touch-action:manipulation; }
    .btn,.member-tab,.tabs button { min-height:44px; }
    .btn { white-space:normal; text-align:center; max-width:100%; }
    .section-head,.tools,.product-management-toolbar,.creator-directory-toolbar { flex-wrap:wrap; gap:12px; }
    .tools > input,.product-management-toolbar > input { min-width:0; max-width:100%; }
    .tabs,.creator-sort { display:flex; max-width:100%; overflow-x:auto; flex-wrap:nowrap; overscroll-behavior-x:contain; }
    .tabs button,.creator-sort button { flex:0 0 auto; white-space:nowrap; }
    .table-wrap { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
    .data-table th,.data-table td { padding:12px; }
    .data-table td .btn { margin:3px; }
    .managed-product-name { min-width:170px; }
    .role-access-modal,.publish-modal,.legal-modal,.detail-modal { padding:12px; max-height:var(--mobile-height,100dvh); overflow-y:auto; overscroll-behavior:contain; }
    .role-access-dialog,.publish-dialog,.legal-dialog,.detail-card { max-width:100%; max-height:calc(var(--mobile-height,100dvh) - 24px); overflow-y:auto; padding:48px 20px 24px; }
    .publish-close,.role-access-close { min-width:44px; min-height:44px; top:6px; right:6px; }
    #memberModal { top:var(--mobile-offset,0px); bottom:auto; display:flex; align-items:center; justify-content:center; height:var(--mobile-height,100dvh); padding:12px; visibility:hidden; }
    #memberModal.open { visibility:visible; }
    #memberModal .member-modal,#memberModal.open .member-modal { position:relative; left:auto; top:auto; transform:none; width:min(650px,100%); max-height:calc(var(--mobile-height,100dvh) - 24px); overflow:auto; overscroll-behavior:contain; border-radius:20px; }
    #memberModal .member-layout { display:block; min-height:0; }
    #memberModal .member-side { border-radius:20px 20px 0 0; padding:16px; }
    #memberModal .member-side h2 { margin:0 0 12px; padding-right:42px; }
    #memberModal .member-tabs { display:flex; overflow-x:auto; gap:4px; }
    #memberModal .member-tab { width:auto; flex-shrink:0; white-space:nowrap; padding:10px 12px; }
    #memberModal .member-main,#memberModal .login-view .member-main { padding:28px 20px; }
    #memberModal .member-main > .close { position:absolute; top:8px; right:8px; z-index:2; width:44px; height:44px; color:white; background:var(--green); border-radius:50%; }
    #memberModal .form-row { grid-template-columns:1fr; }
    #memberModal .member-pane h2 { font-size:24px; overflow-wrap:anywhere; }
    #memberModal .member-pane p { overflow-wrap:anywhere; }
    .application-shell { width:calc(100% - 28px); max-width:100%; }
    .application-shell .card { padding:20px; }
    .application-shell dd { margin-left:0; overflow-wrap:anywhere; }
    .application-steps { flex-wrap:wrap; gap:12px; }
    .creator-chat { right:10px; bottom:max(10px,env(safe-area-inset-bottom)); top:auto; width:min(400px,calc(100vw - 20px)); height:min(600px,calc(var(--mobile-height,100dvh) - 20px)); max-height:calc(var(--mobile-height,100dvh) - 20px); }
    .creator-chat-header,.creator-chat-product,.creator-chat-form { flex-shrink:0; }
    .creator-chat-header > div { min-width:0; overflow-wrap:anywhere; }
    .creator-chat-messages { min-height:0; overscroll-behavior:contain; }
    .creator-chat-form textarea { font-size:16px; }
    .creator-chat-header button,.creator-chat-form button { min-width:44px; min-height:44px; }
    .creator-chat > select { flex-shrink:0; }
    .creator-chat.open { transform:none; }
    .creator-chat { top:calc(var(--mobile-offset,0px) + max(10px,calc(var(--mobile-height,100dvh) - 610px))); bottom:auto; }
    .notice,.toast { max-width:calc(100vw - 24px); overflow-wrap:anywhere; }
    body.has-site-menu .nav-inner { position:relative; flex-wrap:wrap; gap:8px; min-height:72px; padding:10px 0; }
    .site-menu-toggle { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border:1px solid var(--line); border-radius:50%; background:var(--paper); color:var(--green); font-size:23px; }
    body.has-site-menu .nav .logo { min-width:0; font-size:clamp(16px,4.6vw,22px); margin-right:auto; white-space:nowrap; }
    body.has-site-menu .nav .home-link { padding:9px 10px; font-size:13px; }
    body.has-site-menu .nav-links { display:none; order:4; width:100%; max-height:calc(var(--mobile-height,100dvh) - 85px); overflow-y:auto; align-items:stretch; flex-direction:column; gap:0; padding:8px 0; }
    body.has-site-menu .nav-links.mobile-open { display:flex; }
    body.has-site-menu .nav-links > a,body.has-site-menu .nav-group > a { display:block; padding:12px 8px; min-height:44px; }
    body.has-site-menu .nav-menu { position:static; display:none; width:auto; min-width:0; max-width:100%; box-shadow:none; }
    body.has-site-menu .nav-group:focus-within .nav-menu { display:block; }
}
@media (max-width:560px) {
    .product-purchase-row { flex-wrap:wrap; gap:10px; }
    .product-purchase-row .btn { flex:1 1 100%; }
    .home-simplified .nav-inner { height:68px; }
    .home-simplified .logo i { width:34px; height:34px; font-size:23px; }
    .home-simplified .mobile-menu { width:40px; height:40px; }
    .product-detail-shell { padding:16px; gap:20px; }
    .detail-product-visual { width:100%; height:auto; aspect-ratio:1 / 1; min-height:0; }
    .detail-product-visual img { min-height:0; }
    .detail-product-copy h1 { font-size:clamp(25px,7vw,34px); }
    .creator-profile-panel { padding:16px; gap:12px; }
    .creator-profile-panel h2 { overflow-wrap:anywhere; }
    .product-filter-bar,.grid.two { grid-template-columns:minmax(0,1fr); }
    .product-management-toolbar { display:grid; grid-template-columns:minmax(0,1fr); }
    .product-management-toolbar input,.product-management-toolbar select { width:100%; }
    .page-hero h1 { font-size:clamp(28px,8vw,36px); }
    .section { padding:36px 0; }
    .publish-dialog input[type=file] { width:100%; }
    #publishPreview { max-height:180px; }
    .publish-gallery img { width:72px; height:72px; }
    .application-actions > * { flex:1 1 100%; }
}
