.crystal-random-button,.crystal-share-button{min-height:42px;padding:10px 16px;border:1px solid rgba(123,219,235,.4);border-radius:12px;background:linear-gradient(135deg,rgba(37,83,105,.55),rgba(22,36,59,.85));color:#def9ff;font:inherit;font-size:13px;cursor:pointer;transition:border-color .2s,background .2s}
.crystal-random-button{border-color:rgba(216,183,118,.5);color:#f3ddb0;background:linear-gradient(135deg,rgba(105,78,32,.32),rgba(23,35,57,.9))}
.crystal-random-button:hover,.crystal-share-button:hover{border-color:#e5cd93;background-color:#214159}
.crystal-random-button:focus-visible,.crystal-share-button:focus-visible{outline:2px solid #8ae4f0;outline-offset:3px}
.crystal-random-button:disabled{opacity:.65;cursor:wait}
.hero-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.crystal-share-fallback{display:flex;flex-direction:column;gap:5px;flex-basis:100%;min-width:0;font-size:12px;color:#c1d9e5}
.crystal-share-fallback input{box-sizing:border-box;width:100%;min-width:0;padding:10px;border:1px solid #44647b;border-radius:8px;background:#101d30;color:#e2f9ff}
.crystal-random-button{margin:4px 0}
@media(max-width:600px){.hero-actions{width:100%}.hero-actions>*{flex:1 1 auto;text-align:center}}
@media(prefers-reduced-motion:reduce){.crystal-random-button,.crystal-share-button{transition:none}}

.crystal-social-share{display:flex;flex-wrap:wrap;gap:8px;flex:1 0 100%;margin-top:6px;padding-top:12px;border-top:1px solid #294153;min-width:0}.social-share-label{flex:1 0 100%;color:#9bb7c9;font-size:12px;margin-bottom:2px}.crystal-social-share .social-share-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 14px;background:#13273b;border:1px solid #486076;border-radius:10px;color:#d8edf4;font:inherit;font-size:12px;text-decoration:none}.crystal-social-share .share-facebook{border-color:#5279af}.crystal-social-share .share-plurk{border-color:#a36744}.crystal-social-share a:hover{background:#203c50;color:#fff}.crystal-social-share a:focus-visible{outline:2px solid #a9e2e9;outline-offset:3px}.producer-credit{display:flex;justify-content:center;align-items:center;gap:8px;margin:18px 0;color:#9eb8c8;font-size:13px}.producer-credit a{color:#d8c18d;text-decoration:none;border-bottom:1px solid #75664a}.producer-credit a:hover{color:#ffe7b6}@media(max-width:480px){.crystal-social-share .social-share-link{flex:1 1 40%}}

/* Keep detail actions in explicit rows, including when the optional polish sheet is cached. */
#crystal-detail-link{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;min-width:0;max-width:100%}
#crystal-detail-link .crystal-detail-profile{min-width:0}
#crystal-detail-link .crystal-no-link{min-height:0;margin:0;line-height:1.8}
#crystal-detail-link .crystal-detail-profile .crystal-social{max-width:100%;width:100%}
#crystal-detail-link .crystal-link-host{margin:7px 0 0}
.crystal-detail-actions,.crystal-detail-management{display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-width:0}
.crystal-detail-actions>button,.crystal-detail-management>button,.crystal-detail-management>a{box-sizing:border-box;min-height:44px;max-width:100%;margin:0;white-space:normal;line-height:1.5}
#crystal-detail-link>.crystal-social-share{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0;padding:18px 0 0}
#crystal-detail-link .social-share-label{grid-column:1/-1;margin:0}
#crystal-detail-link .social-share-link{box-sizing:border-box;min-width:0;min-height:44px;padding:10px 12px;white-space:normal;text-align:center;line-height:1.5}
.crystal-detail-actions>.crystal-share-fallback{order:1;flex-basis:100%}
@media(max-width:700px){
 .crystal-lightbox .lightbox-info{flex-flow:column nowrap;align-items:stretch}
 .crystal-lightbox .lightbox-info>*{flex:0 0 auto;width:100%}
 #crystal-detail-link{width:100%;gap:16px}
 .crystal-detail-actions>button{flex:1 1 155px}
 .crystal-detail-management>button,.crystal-detail-management>a{flex:1 1 155px;justify-content:center;text-align:center}
 #crystal-detail-link>.crystal-social-share{grid-template-columns:repeat(2,minmax(0,1fr));padding-top:16px}
}

/* v29 — the same compact crystal buttons on editor, gallery and public shares. */
.crystal-social-share,.social-share-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;width:100%}
.social-share-label{grid-column:1/-1;margin:0 0 2px}
/* Match the original editor's solid social buttons. */
.crystal-social-share .social-share-link,.social-share-links .social-share-link{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:52px;padding:12px 14px;border:1px solid #333;border-radius:4px;background:#000;box-shadow:none;color:#fff;font:700 16px/1.5 CardHuninn,'Noto Sans TC',sans-serif;text-align:center;text-decoration:none;white-space:normal}
.crystal-social-share .share-facebook,.social-share-links .share-facebook{border-color:#1877f2;background:#1877f2}
.crystal-social-share .share-plurk,.social-share-links .share-plurk{border-color:#cf682f;background:#cf682f}
.crystal-social-share .share-threads,.social-share-links .share-threads{border-color:#454545;background:#181818}
.crystal-social-share .share-facebook:before,.social-share-links .share-facebook:before{content:'f';font:900 24px/1 Arial,sans-serif}
.crystal-social-share .share-plurk:before,.social-share-links .share-plurk:before{content:'P';font:500 22px/1 Arial,sans-serif}
.crystal-social-share .social-share-link:hover,.social-share-links .social-share-link:hover{color:#fff;background:#111;border-color:#555}
.crystal-social-share .share-facebook:hover,.social-share-links .share-facebook:hover{background:#166fe5;border-color:#166fe5}
.crystal-social-share .share-plurk:hover,.social-share-links .share-plurk:hover{background:#b85b28;border-color:#b85b28}
.social-share-links .social-share-link:focus-visible{outline:2px solid #a9e2e9;outline-offset:3px}
#share-copy.crystal-share-button{min-height:44px;border-radius:10px;border-color:#507284;background:linear-gradient(135deg,#1d4354,#12263b);color:#def9ff}
#detail-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin:20px 0}
#detail-actions>.crystal-detail-actions,#detail-actions>.crystal-detail-management{padding:0}
#detail-actions>.crystal-social-share{margin:0;padding:16px 0 0}
#detail-actions .crystal-detail-actions>button{min-height:44px;border:1px solid #3c5870;border-radius:8px;padding:10px 14px;background:#11273d;color:#ccdee9;font:inherit;font-size:12px}
#detail-actions .crystal-detail-actions>.crystal-random-button{color:#f3ddb0;border-color:#816c46;background:linear-gradient(135deg,#3a3328,#172339)}
#detail-actions .crystal-detail-actions>button:hover{border-color:#9abfca;background-color:#1e3a50}
@media(max-width:700px){#detail-actions .crystal-detail-actions>button{flex:1 1 145px}#detail-actions .crystal-detail-management>button{flex:1 1 145px}}

/* v31 — one clear download action, separate from social and management rows. */
.crystal-download-button,#crystal-detail-link>a.crystal-download-button,#detail-actions>a.crystal-download-button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-width:0;min-height:48px;margin:0;padding:12px 16px;border:1px solid #86cad6;border-radius:10px;background:linear-gradient(135deg,#b9e5e9,#8ec8d7);color:#11293a;font:700 14px/1.6 CardHuninn,'Noto Sans TC',sans-serif;text-decoration:none;text-align:center;white-space:normal;overflow-wrap:anywhere;cursor:pointer;touch-action:manipulation;transition:background .18s,border-color .18s}
.crystal-download-button:hover,#crystal-detail-link>a.crystal-download-button:hover,#detail-actions>a.crystal-download-button:hover{color:#0a2234;border-color:#d7faff;background:linear-gradient(135deg,#d6f4f7,#a8dde6)}
.crystal-download-button:focus-visible{outline:2px solid #f1d69b;outline-offset:3px}
.share-info>.crystal-download-button{margin-top:24px}
.share-info>.crystal-download-button+.share-primary{margin-top:12px;background:#142d40;border:1px solid #4d7288;color:#d5edf3;font-size:14px}
@media(prefers-reduced-motion:reduce){.crystal-download-button{transition:none}}
body[data-motion=reduced] .crystal-download-button{transition:none}
