:root {
    --blue: #1268f3;
    --blue-dark: #0a46d9;
    --cyan: #1fcdf4;
    --text: #202124;
    --muted: #70757a;
    --line: #dfe1e5;
    --surface: #ffffff;
    --hover: #f6f8fb;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; width: 100%; overflow-x: hidden; }
body {
    font-family: "Sarabun", Arial, sans-serif;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.home {
    min-height: 100vh;
    display: grid;
    place-items: center;
}
.home-shell {
    width: min(720px, calc(100% - 32px));
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-7vh);
}
.home-logo {
    width: min(390px, 72vw);
    height: 205px;
    object-fit: contain;
    margin-bottom: 4px;
}
.search-form {
    position: relative;
    width: 100%;
    max-width: 670px;
}
.search-box {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 10px 0 18px;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(60,64,67,.08);
    transition: box-shadow .18s ease, border-color .18s ease;
}
.search-box:focus-within,
.search-box:hover {
    border-color: transparent;
    box-shadow: 0 2px 9px rgba(60,64,67,.18);
}
.search-icon {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    fill: none;
    stroke: #9aa0a6;
    stroke-width: 2;
    stroke-linecap: round;
}
.search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #202124;
    font-size: 18px;
    font-weight: 400;
    padding: 16px 0;
}
.search-box input::-webkit-search-cancel-button { display: none; }
.search-button {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(145deg, var(--cyan), var(--blue) 58%, var(--blue-dark));
    box-shadow: 0 4px 10px rgba(18,104,243,.20);
}
.search-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.home-actions { margin-top: 22px; }
.ai-chip,
.ai-tab {
    border: 1px solid #dfe3e8;
    background: #fff;
    color: #303134;
    cursor: pointer;
    font-weight: 600;
}
.ai-chip {
    border-radius: 999px;
    padding: 10px 17px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 1px 3px rgba(60,64,67,.06);
}
.ai-chip:hover, .ai-tab:hover { background: #f7f9fc; }
.sparkle { color: var(--blue); }

.suggestions {
    position: absolute;
    z-index: 60;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    overflow: hidden;
    border: 1px solid #e7e9ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(32,33,36,.14);
}
.suggestion-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid #f1f3f4;
    background: #fff;
    text-align: left;
    cursor: pointer;
}
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item:hover, .suggestion-item.active { background: var(--hover); }
.suggestion-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--blue-dark);
    background: #edf5ff;
}
.suggestion-copy { min-width: 0; }
.suggestion-copy strong,
.suggestion-copy small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.suggestion-copy strong { font-size: 15px; font-weight: 600; }
.suggestion-copy small { margin-top: 2px; color: var(--muted); font-size: 12px; }

.search-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid #eceff2;
}
.topbar {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 12px 36px 8px;
    width: 100%;
    min-width: 0;
}
.brand {
    display: block;
    width: 150px;
    flex: 0 0 auto;
}
.brand img {
    display: block;
    width: 100%;
    height: auto;
}
.top-search { max-width: 690px; }
.top-search .search-box { min-height: 52px; }
.top-search .search-box input { padding: 12px 0; font-size: 17px; }
.top-search .search-button { width: 40px; height: 40px; }

.search-tabs {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 4px 24px 0;
    margin-left: clamp(175px, 12vw, 206px);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    white-space: nowrap;
    max-width: calc(100vw - clamp(175px, 12vw, 206px));
}
.search-tabs::-webkit-scrollbar { display: none; }
.ai-tab {
    border-radius: 999px;
    padding: 9px 13px;
    display: inline-flex;
    gap: 7px;
    align-items: center;
    flex: 0 0 auto;
}
.ai-tab span { color: var(--blue); }
.search-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 47px;
    border: 0;
    background: transparent;
    color: #6f7479;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    flex: 0 0 auto;
}
.search-tab:hover { color: #31363b; }
.search-tab.active { color: #202124; }
.search-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--blue);
}
.more-wrap { position: relative; flex: 0 0 auto; }
.more-button { padding: 0; }
.chevron { margin-left: 4px; font-size: 12px; }
.more-menu {
    position: absolute;
    top: 42px;
    left: -10px;
    min-width: 150px;
    padding: 7px;
    border: 1px solid #e5e8ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(32,33,36,.15);
}
.more-menu button {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
}
.more-menu button:hover { background: #f5f7fa; }

.results-shell {
    width: min(900px, calc(100% - 48px));
    margin-left: clamp(34px, 12vw, 190px);
    padding: 25px 0 70px;
}
.result-summary {
    margin: 0 0 25px;
    color: var(--muted);
    font-size: 14px;
}
.results-list { display: grid; gap: 31px; }
.result-item { max-width: 720px; }
.result-origin {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.domain-badge {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: #f1f5fb;
    color: #3c4043;
    font-size: 13px;
    font-weight: 700;
}
.result-origin strong,
.result-origin small { display: block; }
.result-origin strong { font-size: 14px; font-weight: 500; color: #202124; }
.result-origin small { margin-top: 1px; color: #5f6368; font-size: 12px; }
.result-item h2 {
    margin: 7px 0 5px;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 500;
}
.result-item h2 a { color: #1558d6; text-decoration: none; }
.result-item h2 a:hover { text-decoration: underline; }
.result-item p {
    margin: 0;
    color: #4d5156;
    font-size: 15px;
    line-height: 1.55;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 14px;
}
.image-card,
.video-card,
.product-card {
    min-width: 0;
    text-decoration: none;
}
.image-frame {
    height: 165px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f3f4;
    margin-bottom: 8px;
}
.image-frame img,
.video-thumb img,
.product-image img,
.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.image-card strong,
.image-card small,
.video-card strong,
.video-card small,
.product-card strong,
.product-card small,
.product-card b { display: block; }
.image-card strong,
.video-card strong,
.product-card strong {
    font-size: 14px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}
.image-card small,
.video-card small,
.product-card small { color: #777c80; font-size: 12px; margin-top: 4px; }

.video-results-list {
    display: grid;
    gap: 30px;
    max-width: 760px;
}
.video-result-row {
    display: block;
    text-decoration: none;
    color: inherit;
}
.video-result-source {
    color: #5f6368;
    font-size: 13px;
    margin-bottom: 6px;
}
.video-result-title {
    display: block;
    color: #1558d6;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 500;
    margin-bottom: 10px;
}
.video-result-row:hover .video-result-title { text-decoration: underline; }
.video-result-body {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}
.video-result-thumb {
    position: relative;
    width: 164px;
    height: 92px;
    flex: 0 0 164px;
    border-radius: 9px;
    overflow: hidden;
    background: #edf0f4;
}
.video-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 2px 5px;
    border-radius: 4px;
    color: #fff;
    background: rgba(0,0,0,.76);
    font-size: 11px;
    line-height: 1.2;
}
.video-result-copy {
    min-width: 0;
    color: #4d5156;
    font-size: 14px;
    line-height: 1.5;
}
.video-result-copy p {
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-meta { color: #70757a; font-size: 13px; }

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
}
.video-thumb {
    position: relative;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    background: #edf0f4;
    margin-bottom: 9px;
}
.play {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding-left: 2px;
    color: #fff;
    background: rgba(0,0,0,.68);
    font-size: 14px;
}
.shorts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 16px;
}
.short-card .video-thumb { height: 310px; border-radius: 16px; }

.shopping-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 16px;
}
.product-image {
    height: 190px;
    border-radius: 14px;
    overflow: hidden;
    background: #f4f5f7;
    margin-bottom: 9px;
}
.product-card b { margin-top: 6px; font-size: 17px; }

.news-list { display: grid; gap: 0; max-width: 780px; }
.news-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eceff1;
    text-decoration: none;
}
.news-copy { min-width: 0; }
.news-copy small { color: #6f7479; }
.news-copy strong { display: block; margin-top: 7px; font-size: 19px; line-height: 1.3; }
.news-copy p { color: #555b60; line-height: 1.45; margin: 7px 0 0; }
.news-card img { width: 150px; height: 100px; border-radius: 12px; flex: 0 0 auto; }

.empty-state { padding: 28px 0; max-width: 620px; }
.empty-state h1 { font-size: 22px; margin: 0 0 8px; }
.empty-state p { color: var(--muted); line-height: 1.6; }
.message.error {
    border: 1px solid #ffd8d8;
    background: #fff8f8;
    color: #9d2727;
    border-radius: 12px;
    padding: 14px 16px;
}

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,24,39,.44); backdrop-filter: blur(3px); }
.modal-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    border-radius: 22px;
    background: #fff;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.20);
}
.modal-close {
    position: absolute;
    right: 14px;
    top: 10px;
    border: 0;
    background: transparent;
    font-size: 28px;
    color: #6b7075;
    cursor: pointer;
}
.ai-orb {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    color: #fff;
    font-size: 25px;
    background: linear-gradient(145deg, var(--cyan), var(--blue) 55%, var(--blue-dark));
}
.modal-card h2 { margin: 0; font-size: 24px; }
.modal-card p { color: #676d73; margin: 10px 0 22px; }
.modal-ok {
    border: 0;
    border-radius: 999px;
    padding: 10px 22px;
    color: #fff;
    background: var(--blue);
    cursor: pointer;
}
.modal-open { overflow: hidden; }

@media (max-width: 900px) {
    .image-grid, .shopping-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shorts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .home-shell { transform: translateY(-4vh); }
    .home-logo { width: min(370px, 82vw); margin-bottom: 32px; }
    .search-box { min-height: 54px; }
    .search-box input { font-size: 16px; }

    .topbar {
        align-items: stretch;
        flex-direction: column;
        gap: 5px;
        padding: 8px 14px 10px;
    }
    .brand { width: 138px; margin: 0 auto; }
    .top-search { max-width: none; }
    .search-tabs { margin-left: 0; padding: 2px 14px 0; gap: 20px; }
    .results-shell { width: calc(100% - 28px); margin: 0 auto; padding-top: 18px; }
    .image-grid, .video-grid, .shopping-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shorts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .image-frame { height: 145px; }
    .video-thumb { height: 125px; }
    .short-card .video-thumb { height: 270px; }
    .product-image { height: 150px; }
    .news-card img { width: 112px; height: 82px; }
}

@media (max-width: 700px) {
    .home-logo { width: min(340px, 78vw); height: 175px; }
    .video-result-body { gap: 12px; }
    .video-result-thumb { width: 132px; height: 74px; flex-basis: 132px; }
    .video-result-title { font-size: 18px; }
}


.video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding-left: 2px;
    color: #fff;
    background: rgba(0,0,0,.70);
    font-size: 13px;
}

@media (max-width: 900px) {
    .topbar { padding-left: 18px; padding-right: 18px; gap: 18px; }
    .brand { width: 112px; }
    .search-tabs { margin-left: 18px; max-width: calc(100vw - 18px); padding-left: 0; padding-right: 18px; }
    .results-shell { width: calc(100% - 36px); margin-left: 18px; margin-right: 18px; }
    .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .home-logo { width: min(330px, 78vw); height: 175px; margin-bottom: 2px; }
    .topbar { gap: 12px; padding-left: 12px; padding-right: 12px; }
    .brand { width: 86px; }
    .top-search .search-box { min-height: 48px; }
    .top-search .search-button { width: 38px; height: 38px; }
    .search-tabs { gap: 18px; margin-left: 12px; max-width: calc(100vw - 12px); }
    .results-shell { width: calc(100% - 24px); margin-left: 12px; margin-right: 12px; padding-top: 20px; }
    .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
    .video-result-body { gap: 12px; }
    .video-result-thumb { width: 142px; height: 80px; flex-basis: 142px; }
    .video-result-title { font-size: 18px; }
    .shorts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* BLOO v4 */
.home-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}
.home-action-button {
    border: 1px solid #f1f3f4;
    border-radius: 6px;
    background: #f8f9fa;
    color: #303134;
    padding: 10px 17px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 1px 1px rgba(0,0,0,.02);
}
.home-action-button:hover {
    border-color: #dadce0;
    box-shadow: 0 1px 1px rgba(0,0,0,.08);
    background: #f8f9fa;
}

.account-button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(145deg, var(--cyan), var(--blue) 58%, var(--blue-dark));
    box-shadow: 0 2px 9px rgba(18,104,243,.24);
    border: 3px solid #fff;
    outline: 1px solid rgba(18,104,243,.12);
    transition: transform .16s ease, box-shadow .16s ease;
    overflow: hidden;
}

.account-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 13px rgba(18,104,243,.30);
}
.account-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.account-button span {
    font-size: 16px;
    font-weight: 700;
}
.home-account-button {
    position: fixed;
    z-index: 80;
    top: 22px;
    right: 26px;
}
.result-account-button { margin-left: auto; }

.search-header { overflow: visible; }
.search-tabs {
    overflow: visible;
    position: relative;
    z-index: 60;
}
.more-wrap {
    position: relative;
    z-index: 120;
}
.more-menu {
    z-index: 500;
    top: 35px;
    left: -12px;
    overflow: visible;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 44px 0 4px;
    padding: 10px 0;
}
.pagination a {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #1558d6;
    font-size: 14px;
    transition: background .15s ease, color .15s ease;
}
.pagination a:hover { background: #f1f5fb; }
.pagination .page-number.active {
    color: #fff;
    background: var(--blue);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(18,104,243,.20);
}
.pagination .page-step { min-width: auto; font-weight: 600; }

/* Conta BLOO */
.account-page {
    min-height: 100vh;
    background: #f8fafc;
}
.account-back-brand {
    position: fixed;
    top: 28px;
    left: 32px;
    width: 132px;
    z-index: 5;
}
.account-back-brand img { display: block; width: 100%; height: auto; }
.account-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 92px 20px 40px;
}
.account-card {
    width: min(460px, 100%);
    background: #fff;
    border: 1px solid #e3e7ec;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 16px 50px rgba(31,45,61,.08);
}
.auth-card { text-align: left; }
.auth-logo {
    width: 124px;
    height: 66px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
}
.account-card h1 {
    margin: 0;
    text-align: center;
    font-size: 25px;
    font-weight: 700;
    color: #202124;
}
.auth-subtitle {
    margin: 8px auto 22px;
    max-width: 360px;
    text-align: center;
    color: #6b7280;
    line-height: 1.45;
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    padding: 4px;
    border-radius: 12px;
    background: #f2f5f9;
    margin-bottom: 22px;
}
.auth-tabs a {
    padding: 10px 12px;
    border-radius: 9px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    color: #646b74;
}
.auth-tabs a.active {
    background: #fff;
    color: #202124;
    box-shadow: 0 1px 4px rgba(31,45,61,.10);
}
.auth-form { display: grid; gap: 15px; }
.auth-form label {
    display: grid;
    gap: 7px;
    color: #3f4650;
    font-size: 14px;
    font-weight: 600;
}
.auth-form input {
    width: 100%;
    height: 50px;
    border: 1px solid #d9dee5;
    border-radius: 12px;
    outline: 0;
    padding: 0 14px;
    background: #fff;
    color: #202124;
    font-size: 16px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-form input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(18,104,243,.10);
}
.primary-account-btn,
.secondary-account-btn {
    min-height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0 20px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
}
.primary-account-btn {
    color: #fff;
    background: linear-gradient(145deg, var(--cyan), var(--blue) 58%, var(--blue-dark));
    box-shadow: 0 5px 14px rgba(18,104,243,.20);
}
.secondary-account-btn {
    width: 100%;
    color: #303134;
    background: #f3f5f7;
}
.auth-message {
    margin: -5px 0 16px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 14px;
}
.auth-message.error {
    background: #fff2f2;
    color: #9c2d2d;
    border: 1px solid #ffd9d9;
}
.signed-card { text-align: center; }
.account-avatar-large {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 17px;
    color: #fff;
    font-size: 25px;
    font-weight: 700;
    background: linear-gradient(145deg, var(--cyan), var(--blue) 58%, var(--blue-dark));
    box-shadow: 0 8px 24px rgba(18,104,243,.20);
}
.signed-card > p {
    color: #68707a;
    margin: 8px 0 18px;
}
.account-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #f1f8f5;
    color: #2e6c4b;
    font-size: 13px;
}
.account-status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #35a56b;
}
.account-card-actions {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}
.account-card-actions form { margin: 0; }

@media (max-width: 900px) {
    .search-tabs {
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 6px;
    }
    .result-account-button { margin-left: 0; }
}

@media (max-width: 720px) {
    .home-account-button { top: 14px; right: 14px; }
    .account-button { width: 38px; height: 38px; }
    .topbar .result-account-button {
        position: absolute;
        right: 12px;
        top: 10px;
    }
    .account-back-brand {
        position: absolute;
        top: 20px;
        left: 20px;
        width: 100px;
    }
    .account-card { padding: 28px 20px; border-radius: 20px; }
}

/* BLOO v5 */
.home-action-button,
.ai-chip {
    min-height: 42px;
    border: 1px solid #e3e6ea;
    border-radius: 999px;
    background: #fff;
    color: #303134;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(60,64,67,.06);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.home-action-button:hover,
.ai-chip:hover {
    background: #f1f3f4;
    border-color: #dadce0;
    box-shadow: 0 1px 4px rgba(60,64,67,.10);
}

.account-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

.site-favicon {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #edf0f3;
}
.site-favicon .favicon-img {
    position: relative;
    z-index: 2;
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.site-favicon .favicon-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1;
}
.site-favicon.favicon-failed .favicon-img { display: none; }

.media-source {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
}
.mini-favicon {
    position: relative;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #edf0f3;
}
.mini-favicon .favicon-img {
    position: relative;
    z-index: 2;
    width: 14px;
    height: 14px;
    object-fit: contain;
}
.mini-favicon .favicon-fallback {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: grid;
    place-items: center;
    color: #8a9096;
    font-size: 12px;
}
.mini-favicon.favicon-failed .favicon-img { display: none; }

.suggestion-icon {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e7eaee;
    border-radius: 50%;
    background: #fff;
}
.suggestion-icon img {
    position: relative;
    z-index: 2;
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.suggestion-icon .suggestion-icon-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    color: var(--blue-dark);
    background: #edf5ff;
    font-size: 14px;
    font-weight: 700;
}
.suggestion-icon.favicon-failed img { display: none; }

/* Login/conta: sem logo solta no canto esquerdo. */
.account-back-brand { display: none !important; }
.account-shell { padding-top: 40px; }
.auth-logo {
    width: 168px;
    height: 86px;
    margin: 0 auto 14px;
}
.auth-form textarea {
    width: 100%;
    border: 1px solid #d9dee5;
    border-radius: 12px;
    outline: 0;
    padding: 13px 14px;
    resize: vertical;
    min-height: 108px;
    background: #fff;
    color: #202124;
    font: inherit;
    font-size: 16px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(18,104,243,.10);
}
.auth-message.success {
    background: #effaf4;
    color: #246744;
    border: 1px solid #cfead9;
}

.panel-card {
    width: min(760px, 100%);
    text-align: left;
    padding: 30px;
}
.panel-user-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid #edf0f3;
}
.panel-user-head .account-avatar-large {
    margin: 0;
    width: 72px;
    height: 72px;
    overflow: hidden;
}
.account-avatar-large.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.account-avatar-large.has-photo > span:not(.avatar-edit-badge) {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}
.panel-user-copy { min-width: 0; }
.panel-user-copy h1 {
    text-align: left;
    font-size: 23px;
    margin: 0;
}
.panel-user-copy p {
    margin: 4px 0 0;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-user-head .account-status { justify-self: end; }

.account-panel-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}
.panel-nav-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 76px;
    padding: 12px 13px;
    border: 1px solid #e5e8ec;
    border-radius: 16px;
    text-decoration: none;
    background: #fff;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.panel-nav-item:hover,
.panel-nav-item.active {
    background: #f6f8fb;
    border-color: #d8dde4;
    box-shadow: 0 2px 8px rgba(31,45,61,.05);
}
.panel-nav-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--blue);
    background: #edf5ff;
    font-size: 21px;
    font-weight: 700;
}
.panel-nav-item strong,
.panel-nav-item small { display: block; }
.panel-nav-item strong { font-size: 14px; color: #25292e; }
.panel-nav-item small { margin-top: 2px; color: #777e86; font-size: 12px; line-height: 1.25; }

.panel-section,
.panel-welcome {
    margin-top: 24px;
    padding: 22px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #edf0f3;
}
.panel-section-heading h2,
.panel-welcome h2 { margin: 0; font-size: 20px; }
.panel-section-heading p,
.panel-welcome p { margin: 6px 0 0; color: #6b7280; line-height: 1.5; }
.index-site-form { margin-top: 20px; }
.panel-message { margin: 20px 0 0; }
.panel-logout { margin: 20px 0 0; }
.panel-logout .secondary-account-btn { width: 100%; }

.profile-photo-form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}
.photo-picker {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px dashed #cfd5dc;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
}
.photo-picker:hover { background: #f7f9fb; }
.photo-picker input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.photo-preview {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(145deg, var(--cyan), var(--blue) 58%, var(--blue-dark));
}
.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-picker-copy strong,
.photo-picker-copy small { display: block; }
.photo-picker-copy strong { color: #2d3238; }
.photo-picker-copy small { margin-top: 4px; color: #7b828a; font-weight: 400; }

@media (max-width: 760px) {
    .panel-card { padding: 22px 16px; }
    .panel-user-head {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .panel-user-head .account-status {
        grid-column: 1 / -1;
        justify-self: start;
    }
    .account-panel-nav { grid-template-columns: 1fr; }
    .panel-section, .panel-welcome { padding: 18px; }
}


/* BLOO v6 — painel mais limpo e foto alterada direto pelo avatar. */
.avatar-upload-form {
    margin: 0;
    width: 72px;
    height: 72px;
}
.clickable-avatar {
    position: relative;
    cursor: pointer;
    margin: 0 !important;
    user-select: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.clickable-avatar:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(18,104,243,.24);
}
.avatar-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.account-avatar-large.has-photo .avatar-edit-badge {
    position: absolute;
    z-index: 4;
    right: -2px;
    bottom: -2px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #1268f3;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 2px 7px rgba(18,104,243,.25);
}
.account-panel-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 620px) {
    .panel-user-head {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .panel-user-head .account-status {
        grid-column: 1 / -1;
        justify-self: start;
        margin-left: 88px;
        margin-top: -12px;
    }
    .account-panel-nav { grid-template-columns: 1fr; }
}


/* BLOO v7 — favicon transparente deve revelar somente o fundo branco.
   O fallback fica escondido enquanto o favicon real carregou. */
.site-favicon,
.mini-favicon,
.suggestion-icon {
    background: #fff !important;
}
.site-favicon .favicon-fallback,
.mini-favicon .favicon-fallback,
.suggestion-icon .suggestion-icon-fallback {
    display: none !important;
    background: #fff !important;
}
.site-favicon.favicon-failed .favicon-fallback,
.mini-favicon.favicon-failed .favicon-fallback,
.suggestion-icon.favicon-failed .suggestion-icon-fallback {
    display: grid !important;
}
.site-favicon .favicon-img,
.mini-favicon .favicon-img,
.suggestion-icon img {
    background: transparent !important;
}

/* Foto do usuário: a própria foto preenche o círculo inteiro, sem sobrar moldura interna. */
.account-button.is-user {
    padding: 0 !important;
    background: #fff !important;
}
.account-button.is-user .account-photo {
    width: 100% !important;
    height: 100% !important;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 50% !important;
    display: block !important;
}
\n\n/* BLOO v8 — painel e avatar alinhados com a bolinha da página principal. */\n.panel-card-brand {\n    width: 126px;\n    height: 60px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    margin: 0 auto 22px;\n    text-decoration: none;\n}\n.panel-card-brand img {\n    display: block;\n    width: 100%;\n    height: 100%;\n    object-fit: contain;\n}\n.avatar-upload-form {\n    width: 72px !important;\n    height: 72px !important;\n}\n.panel-avatar-button {\n    width: 72px !important;\n    height: 72px !important;\n    min-width: 72px;\n    min-height: 72px;\n    margin: 0 !important;\n    padding: 0 !important;\n    border-radius: 50% !important;\n    overflow: hidden !important;\n    background: #fff !important;\n    border: 3px solid #fff !important;\n    outline: 1px solid rgba(18,104,243,.22) !important;\n    box-shadow: 0 2px 9px rgba(18,104,243,.24) !important;\n}\n.panel-avatar-button .account-photo {\n    width: 100% !important;\n    height: 100% !important;\n    min-width: 100%;\n    min-height: 100%;\n    object-fit: cover !important;\n    object-position: center center !important;\n    border-radius: 50% !important;\n    display: block !important;\n}\n.panel-avatar-button > span {\n    width: 100%;\n    height: 100%;\n    display: grid;\n    place-items: center;\n    color: #fff;\n}\n.panel-avatar-button:hover {\n    transform: translateY(-1px);\n    box-shadow: 0 4px 13px rgba(18,104,243,.30) !important;\n}\n\n/* O favicon real ocupa o círculo, mantendo transparência sobre fundo branco. */\n.site-favicon .favicon-img {\n    width: 24px !important;\n    height: 24px !important;\n    object-fit: contain !important;\n}\n