/* 帳號、好友與同步延續圖鑑既有的色彩及圓角。 */
#more-button{position:relative}
.notification-dot{position:absolute;top:0;right:0;width:10px;height:10px;border-radius:50%;background:#d85357;border:2px solid var(--bg);box-sizing:content-box}
.account-menu-copy{display:flex;flex-direction:column;min-width:0}
.account-menu-copy>span{font-size:inherit;font-weight:inherit;line-height:22px;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.account-menu-copy small{font-size:10px;color:var(--muted);font-weight:400;margin-top:2px;white-space:normal}
.friends-menu-badge{margin-left:auto;background:#fbebeb;color:#b64049;border-radius:5px;padding:1px 5px;font-size:10px;white-space:nowrap}
.account-dialog{width:460px}
.account-dialog .dialog-description{font-size:13px}
.social-form{display:flex;flex-direction:column;gap:8px}
.social-form label,.find-friend-form>label{font-size:12px;font-weight:600;margin-top:8px}
.social-form input,.social-form select,.find-friend-form input{width:100%;min-width:0;min-height:44px;background:var(--paper);border:1px solid var(--line);border-radius:var(--control-radius);padding:10px 12px;font-size:16px;color:var(--ink)}
:where(html:not([data-focus-mode="pointer"])) .social-form input:focus,:where(html:not([data-focus-mode="pointer"])) .social-form select:focus,:where(html:not([data-focus-mode="pointer"])) .find-friend-form input:focus{border-color:var(--coral);box-shadow:var(--focus-ring)}
.social-form>.primary-button{margin-top:12px;min-height:44px;font-size:13px}
.full-width{width:100%}
.google-signin{width:100%;display:flex;align-items:center;justify-content:center;gap:12px;border:1px solid var(--line);border-radius:var(--control-radius);min-height:46px;font-weight:600;font-size:13px;background:var(--paper)}
@media(hover:hover) and (pointer:fine){.google-signin:hover{background:var(--bg)}}
.google-letter{font-family:Arial,sans-serif;font-weight:700;font-size:20px;color:#4285f4}
.auth-divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:11px;margin:23px 0 10px}
.auth-divider::before,.auth-divider::after{content:'';height:1px;flex:1;background:var(--line)}
.auth-secondary{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.social-note{font-size:11px!important;color:var(--muted);line-height:1.8;margin:5px 0}
.centered{text-align:center}
.account-footnote{font-size:11px;color:var(--muted);border-top:1px solid var(--line);padding-top:16px;margin-top:18px;line-height:1.9}
.account-footnote a{display:inline-block;text-decoration:underline;text-underline-offset:3px;margin-top:5px}
.privacy-footer{padding:28px 20px 32px;text-align:center;font-size:11px;color:var(--muted)}
.privacy-footer a{text-decoration:underline;text-underline-offset:3px}
.privacy-shell{max-width:740px;margin:auto;padding:28px 24px 64px;font-size:15px;line-height:1.95;overflow-wrap:anywhere}
.privacy-back{display:inline-block;color:var(--coral-dark);font-size:13px;padding:8px 0;margin-bottom:30px}
.privacy-shell h1{font-size:28px;line-height:1.5;margin:6px 0 8px;font-weight:650}
.privacy-date{font-size:12px;color:var(--muted);margin-bottom:26px}
.privacy-shell section{margin-top:30px}
.privacy-shell h2{font-size:18px;font-weight:600;margin-bottom:10px}
.privacy-shell p+p{margin-top:12px}
.privacy-shell ul{padding-left:22px}
.privacy-shell li{margin:10px 0}
.privacy-shell section a{color:var(--coral-dark);text-decoration:underline;text-underline-offset:3px}
.form-message{font-size:12px;color:var(--coral-dark);line-height:1.8;min-height:0;margin:10px 0;overflow-wrap:anywhere}
.form-message:empty{margin:0}
.form-message.error,.social-error{color:#ae4349}
.social-loading{padding:28px 0;text-align:center;color:var(--muted);font-size:13px}
.profile-portrait,.friend-profile{display:flex;align-items:center;gap:14px;padding:18px 0}
.profile-portrait>div,.friend-profile>div{min-width:0}
.profile-portrait strong,.friend-profile strong{font-size:17px;display:block;overflow-wrap:anywhere}
.profile-portrait>div>span{display:block;font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.social-avatar{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:50%;background:var(--bg);overflow:hidden}
.social-avatar img{width:100%;height:100%;object-fit:cover}
.social-avatar:empty{border:1px solid var(--line)}
.profile-field-label{font-size:12px;font-weight:600;margin-top:8px}
.avatar-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.avatar-upload-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:0!important;cursor:pointer}
:where(html:not([data-focus-mode="pointer"])) .avatar-upload-button:focus-visible{outline:2px solid var(--coral);outline-offset:3px}
.social-avatar.large{width:64px;height:64px;flex-basis:64px}
.profile-section{border-top:1px solid var(--line);padding-top:18px;margin-top:20px}
.profile-section h3,.friends-section>h3{font-size:13px;font-weight:650;margin:0 0 10px}
.friend-code-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.friend-code-row code,.my-friend-code code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:16px;letter-spacing:.5px;color:var(--coral-dark);white-space:nowrap}
.login-method{font-size:12px;color:var(--coral-dark);margin:10px 0}
.logout-button{display:block;margin:20px auto 0;min-height:44px}
.cloud-sync-status{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:11px 12px;border-radius:10px;background:var(--bg);font-size:11px;color:var(--muted)}
.cloud-sync-status[data-state="saved"]{color:#647c61}
.cloud-sync-status[data-state="conflict"],.cloud-sync-status[data-state="error"]{color:#a26937}
.guest-import-button{margin-top:8px;min-height:40px}
.migration-summary{background:var(--bg);border-radius:12px;padding:12px 16px;margin:16px 0}
.migration-summary>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;font-size:12px}
.migration-summary>div:nth-child(3){border-top:1px solid var(--line);padding-top:14px;margin-top:6px;color:var(--coral-dark)}
.migration-summary strong{text-align:right;font-weight:600;font-variant-numeric:tabular-nums}
#migration-dialog .confirm-actions{margin-top:20px}
.conflict-row{padding:16px 0;border-bottom:1px solid var(--line)}
.conflict-row h3{font-size:13px;line-height:1.7;margin:0 0 10px}
.conflict-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.conflict-choices button{display:flex;flex-direction:column;white-space:normal;border:1px solid var(--line)}
.conflict-choices small{font-size:11px;font-weight:400}
.friends-dialog{width:860px;max-height:calc(var(--dialog-height,100dvh) - 44px);scrollbar-gutter:stable;overscroll-behavior:contain}
.social-eyebrow{display:block;color:var(--muted);font-size:11px;margin-bottom:3px}
.my-friend-code{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:12px;padding:12px 15px;margin:16px 0;font-size:11px;color:var(--muted)}
.my-friend-code>div{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.my-friend-code .text-button{color:var(--action-pink-ink)}
.my-friend-code .text-button:hover{color:var(--action-pink-ink)}
.find-friend-form{margin:20px 0 12px}
.find-friend-form>div{display:flex;gap:8px;margin-top:7px}
.friend-code-field{position:relative;flex:1;min-width:0}
.find-friend-form input{padding-right:44px}
.find-friend-form>div>.primary-button{min-width:76px;border:1px solid transparent}
.friend-code-clear{position:absolute;right:0;top:0;display:grid;place-items:center;width:44px;height:100%;min-height:44px;color:var(--muted);border-radius:var(--control-radius)}
.friend-code-clear svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
@media(hover:hover) and (pointer:fine){.friend-code-clear:hover{color:var(--ink)}}
.friends-section{border-top:1px solid var(--line);padding-top:20px;margin-top:24px}
.section-count{font-size:11px;margin-left:5px;color:var(--muted);font-weight:400}
.friend-row{display:flex;align-items:center;gap:12px;padding:13px 0;min-width:0}
.friend-row-info{flex:1;min-width:0}
.friend-row-info strong{display:block;font-size:13px;font-weight:600;overflow-wrap:anywhere}
.friend-row-info>span{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.friend-row.friend-row-link{width:100%;text-align:left;padding:13px 8px;border-radius:12px;flex-wrap:nowrap}
.friend-row-link .friend-row-info strong{font-size:16px}
.friend-row-chevron{width:18px;height:18px;color:var(--muted)}
.friend-row-link:focus-visible{outline-offset:-2px}
.friend-row-link:active{background:var(--pink)}
@media(hover:hover) and (pointer:fine){.friend-row-link:hover{background:var(--pink)}}
.friend-row-actions{display:flex;align-items:center;gap:6px}
.friend-row .primary-button,.friend-row .secondary-button{min-height:44px}
.social-empty{padding:24px 18px;border-radius:12px;background:var(--bg);text-align:center;margin:12px 0}
.social-empty strong{font-size:14px;font-weight:600}
.social-empty p{font-size:12px;line-height:1.9;color:var(--muted);max-width:340px;margin:6px auto 0}
.social-error{background:#fcf0ee;padding:14px;border-radius:10px;font-size:12px;line-height:1.8;margin-top:12px}
.social-error button{margin-top:8px}
.blocked-list{border-top:1px solid var(--line);padding-top:18px;margin-top:24px;font-size:12px;color:var(--muted)}
.blocked-list summary{cursor:pointer;min-height:32px}
.friend-detail-heading{display:flex;gap:4px;align-items:center;min-width:0}
.friend-detail-heading h2{font-size:20px;overflow-wrap:anywhere;letter-spacing:.3px}
.friend-detail-heading .icon-button{margin-left:-8px;flex-shrink:0}
.friend-profile{border-bottom:1px solid var(--line)}
.friend-profile>div{flex:1}
.friend-settings-button{min-height:44px;background:var(--action-pink);border:1px solid var(--action-pink);color:var(--paper);font-size:12px}
.friend-settings-button:hover,.friend-settings-button[aria-expanded="true"]{background:var(--action-pink-hover);border-color:var(--action-pink-hover);color:var(--paper)}
.friend-profile p{font-size:12px;color:var(--muted);margin-top:3px}
.friend-profile b{color:var(--ink);font-weight:600}
.friend-settings{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;padding:0 0 10px}
.friend-settings .text-button{min-height:44px;padding:9px 12px;border:1px solid var(--line);border-radius:var(--control-radius);color:var(--ink)}
.friend-settings .text-button:hover{background:var(--bg)}
.friend-settings [data-confirm-friend="block"]{color:#AE4349;border-color:#E3BCC0}
.social-confirm{background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:16px;margin:12px 0}
.social-confirm strong{font-size:13px;overflow-wrap:anywhere}
.social-confirm p{font-size:12px;color:var(--muted);margin:7px 0 12px}
.social-confirm>div{display:flex;gap:8px;justify-content:flex-end}
.friend-collection-summary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0 12px;padding:10px 0;border-bottom:1px solid var(--line)}
.collection-story{flex:1;min-width:150px;font-size:13px;line-height:1.9;color:var(--muted);margin:0;overflow-wrap:anywhere}
.collection-story strong{color:var(--coral-dark);font-weight:600}
.friend-collection-summary .friend-analysis-link{display:inline-flex;align-items:center;gap:2px;min-height:44px;color:var(--coral-dark);font-size:12px}
.friend-analysis-link svg{width:15px;height:15px}
.friend-analysis{max-width:560px;margin:0 auto;padding-bottom:4px}
.friend-analysis-owner{font-size:12px;color:var(--muted);margin:4px 0 18px;overflow-wrap:anywhere}
.friend-analysis-tabs{display:flex;flex-wrap:wrap;gap:12px 22px;border-bottom:1px solid var(--line);margin-bottom:24px}
.friend-analysis-tabs button{min-height:44px;padding:8px 0;border-bottom:2px solid transparent;font-size:13px;color:var(--muted)}
.friend-analysis-tabs button[aria-pressed="true"]{color:var(--coral-dark);border-bottom-color:var(--coral);font-weight:600}
.stat-line{margin:0 0 22px}
.stat-line>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:13px}
.stat-line>div>span{min-width:0;overflow-wrap:anywhere}
.stat-line strong{flex-shrink:0;font-weight:500;white-space:nowrap;font-variant-numeric:tabular-nums}
.stat-line small{font-size:12px;color:var(--muted);margin-left:8px}
.stat-track{height:4px;border-radius:8px;display:block;background:var(--line);overflow:hidden;margin-top:8px}
.stat-track>span{height:100%;display:block;background:#c3948b;border-radius:inherit}
.friend-analysis-note{font-size:11px;color:var(--muted);line-height:1.8;margin:0 0 8px}
.friends-dialog .friend-analysis-more{min-height:44px;color:var(--coral-dark);font-size:12px}
.friend-view-tabs{display:flex;flex-wrap:wrap;border-bottom:1px solid var(--line);gap:18px;margin:18px 0}
.friend-view-tabs button{position:relative;min-height:44px;font-size:13px;color:var(--muted);padding:10px 0}
.friend-view-tabs button[aria-pressed="true"]{color:var(--action-pink-ink);font-weight:600}
.friend-view-tabs button[aria-pressed="true"]::after{position:absolute;bottom:-1px;left:0;right:0;height:2px;background:var(--action-pink);content:''}
.comparison-summary{margin:16px 0 20px;font-size:13px;line-height:1.8;color:var(--muted)}
.comparison-summary p{margin:0;overflow-wrap:anywhere}
.comparison-summary p+p{margin-top:6px}
.comparison-person{color:var(--ink)}
.comparison-separator{margin:0 3px;color:var(--muted)}
.comparison-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0}
.comparison-tabs button{border:1px solid var(--line);border-radius:12px;padding:11px 6px;font-size:11px;color:var(--muted);line-height:1.7}
.comparison-tabs button[aria-pressed="true"]{border-color:var(--action-pink);background:var(--action-pink-soft);color:var(--action-pink-ink)}
.comparison-tabs strong{display:block;font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}
/* 好友商品直接套用主圖鑑卡片及工具列，不再保留另一套舊版尺寸。 */
.friend-product-filters{display:grid;gap:8px}
.friend-search-row input{text-overflow:ellipsis}
.friend-filter-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.friend-filter-options .series-anchor{grid-column:auto}
#friend-series-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.friend-results-count{font-size:12px;color:var(--muted);margin:0 0 16px}
.friend-products .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.friend-products .product-image{aspect-ratio:1.03}
.friend-products .product-card{align-self:start}
.friend-products .friend-status{pointer-events:none}
.friend-comparison-quantity{font-size:10px;color:var(--muted);padding:0 8px 8px;line-height:1.6;font-variant-numeric:tabular-nums}
.friend-products .image-fallback{text-align:center;font-size:10px}
.friend-catalog-toolbar{max-width:660px}
.friend-catalog-toolbar .friend-results-count{margin:0}
@media(min-width:701px){.friend-products .product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){
  .friends-dialog{padding:20px 16px;width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(var(--dialog-height,100dvh) - 24px)}
  .friends-dialog .text-button,.account-dialog .text-button{font-size:12px;min-height:40px}
  .my-friend-code{display:block;padding:12px}
  .my-friend-code>div{gap:6px 10px;justify-content:flex-start;margin-top:4px}
  .my-friend-code code{margin-right:auto;font-size:14px}
  .friend-row{gap:8px;flex-wrap:wrap}
  .friend-row-info{min-width:90px}
  .friend-row-actions{gap:4px}
  .friend-profile{gap:10px;flex-wrap:wrap}
  .friend-profile>.friend-settings-button{margin-left:auto}
  .friend-profile strong{font-size:16px}
  .social-avatar.large{width:54px;height:54px;flex-basis:54px}
  .friend-analysis-tabs{gap:12px 18px}
  .friend-products{gap:8px}
  .friend-product h3{font-size:11px;margin:0 6px}
  .friend-product>small{margin:7px 6px 4px;font-size:8px}
  .friend-product>p{font-size:9px;margin:6px}
  .friend-detail-heading h2{font-size:18px}
  .comparison-tabs{gap:6px}
  .comparison-tabs button{font-size:10px;padding:10px 3px}
  .social-form select{font-size:16px}
}
