/* H5 P0: scoped entry layer; desktop workbench keeps its original layout. */
.h5-home,.h5-create-preview,.h5-nav,.h5-result-links{display:none}
.h5-library-tools{display:none}
.h5-theme-filter-sheet{padding:0;border:0}
.h5-theme-filter-sheet:not([open]){display:none}
.h5-image-viewer{position:fixed;inset:0;z-index:5000;background:#101713;color:#f4eee3;display:flex;flex-direction:column;padding:16px;box-sizing:border-box;overflow:auto}
.h5-image-viewer[hidden]{display:none}
.h5-image-viewer header{display:flex;gap:16px;justify-content:space-between;align-items:center;flex-shrink:0}
.h5-image-viewer button{min-width:44px;min-height:44px}
.h5-image-viewer img{display:block;max-width:100%;height:auto;object-fit:contain;margin:auto;min-height:0}
.h5-image-viewer p{flex-shrink:0;line-height:1.6}
.h5-creation-detail{max-width:760px;margin:auto;line-height:1.65}
.h5-detail-image{display:block;width:100%;padding:0;background:#111c17;border:0;border-radius:16px;overflow:hidden;cursor:zoom-in}
.h5-detail-image img{display:block;width:100%;max-height:72vh;object-fit:contain}
.h5-detail-actions{display:flex;flex-wrap:wrap;gap:12px}
.h5-detail-actions a,.h5-detail-actions button{min-height:46px;padding:10px 16px;border:1px solid #a5b3a5;border-radius:12px;background:#e8eee6;color:#244437;text-decoration:none}
.h5-balance-link,.h5-preview-retry{display:block;padding:12px;border:1px solid #ab9369;border-radius:10px;line-height:1.6;color:#cfb583;background:#203027;white-space:normal}
@media(max-width:850px){
  .h5-workspace #frameStage{touch-action:pan-y}
  .h5-current-preview .frame-stage{overflow:hidden!important;-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 32px),transparent)}
  body.h5-workspace{height:auto;min-width:0;overflow:visible;background:#f8f7f4}
  .h5-workspace .app-shell,.h5-workspace .workspace,.h5-workspace .editor{display:block;width:100%;min-width:0;height:auto;max-height:none;overflow:visible;margin:0;box-sizing:border-box}
  .h5-workspace .app-shell{padding:0 16px calc(90px + env(safe-area-inset-bottom))}
  .h5-workspace:not([data-h5-mode="workbench"]) .creation-toolbar{display:none!important}
  .h5-workspace .ai-advisor-launcher{display:none!important}
  .h5-workspace .logo-shine{display:block;width:100px;height:auto;min-width:0;overflow:visible;box-shadow:none;background:transparent;border:0}
  .h5-workspace .logo-shine:before,.h5-workspace .logo-shine:after{display:none}
  .h5-workspace .topbar .logo-shine img{position:static;display:block;transform:none;width:100px;height:auto;max-height:60px;object-fit:contain}
  .h5-workspace .workspace{padding:0}
  .h5-workspace .site-record-footer{position:static;margin:20px 16px;display:flex;flex-wrap:wrap;transform:none}
  .h5-workspace .topbar{min-height:0!important;height:auto!important;flex-direction:row!important}
  .h5-workspace .topbar .brand-lockup{flex:0 0 90px;width:90px}
  .h5-workspace .topbar .status-strip{width:auto;flex:1;justify-content:flex-end}
  .h5-workspace .topbar{position:relative;display:flex;flex-wrap:wrap;gap:10px;padding:14px 0;min-width:0}
  .h5-workspace .brand-lockup{flex:1;min-width:0}
  .h5-workspace .brand-lockup img{width:92px;max-width:100%;height:auto}
  .h5-workspace .brand-copy,.h5-workspace .brand-divider,.h5-workspace .gift-engine-entry,.h5-workspace #cloudMobileContinue{display:none!important}
  .h5-workspace .status-strip{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
  .h5-workspace .user-card{min-height:44px;width:auto;padding:6px 10px}
  .h5-workspace .user-avatar{width:30px;height:30px}
  .h5-workspace .user-meta small,.h5-workspace .user-menu-caret{display:none}
  .h5-workspace .creative-points-entry{padding:6px 9px;min-width:0;min-height:44px;box-sizing:border-box}
  .h5-workspace .user-dropdown{max-width:calc(100vw - 32px);max-height:70dvh;overflow:auto;z-index:80}
  .h5-nav{position:fixed;z-index:80;inset:auto 0 0;display:flex;gap:4px;width:100%;padding:6px 16px calc(8px + env(safe-area-inset-bottom));box-sizing:border-box;background:rgba(255,254,252,.98);border-top:1px solid #e9e4dd;box-shadow:0 -4px 18px #35271e08}
  .h5-nav a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;flex:1;min-width:0;min-height:48px;border-radius:12px;color:#817469;text-decoration:none;font-size:12px}
  .h5-nav img{width:22px;height:22px;opacity:.6}
  .h5-nav a[aria-current="page"]{color:#58402c;background:#f3ece1;font-weight:700}
  .h5-nav a[aria-current="page"] img{opacity:1}
  .h5-workspace[data-h5-mode="workbench"] .h5-nav,.h5-keyboard .h5-nav{display:none}
  .h5-workspace[data-h5-mode="home"] .preview-band,.h5-workspace[data-h5-mode="themes"] .preview-band{display:none}
  .h5-workspace[data-h5-mode="home"] .editor{display:none}
  .h5-workspace[data-h5-mode="home"] .h5-home{display:block}
  .h5-workspace[data-h5-mode="themes"] .h5-create-preview{display:block;padding-bottom:20px;color:#332a22}
  .h5-create-preview .h5-create-actions{grid-template-columns:minmax(0,1fr)}
  .h5-create-preview .h5-primary{display:none}
  .h5-home{padding-bottom:12px;color:#332a22}
  .h5-home p{font-size:12px;line-height:1.5;color:#8a7b6e}
  .h5-create-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:16px 0 0}
  .h5-upload-button,.h5-home .h5-primary{display:flex;min-width:0;min-height:60px;margin:0;padding:10px 12px;align-items:center;justify-content:center;border-radius:30px;text-decoration:none;box-sizing:border-box;line-height:1.3}
  .h5-upload-button{gap:10px;border:1px solid #ede8e1;background:#fff;color:#211b17;box-shadow:0 8px 20px #37281e12}
  .h5-upload-button.has-artwork{background:#eef5f1;color:#174c46}
  .h5-upload-button img{width:23px;height:23px;flex-shrink:0}
  .h5-upload-button>span{display:flex;flex-direction:column;gap:4px;text-align:left}
  .h5-upload-button strong,.h5-home .h5-primary strong{font-size:15px;font-weight:700}
  .h5-upload-button small,.h5-home .h5-primary small{font-size:11px;font-weight:400}
  .h5-upload-button small{color:#8a7e75}
  .h5-home .h5-primary{flex-direction:column;gap:4px;background:#493528;border:1px solid #493528;color:#fffaf3}
  .h5-home .h5-primary small{color:#e5d5c2}
  .h5-home .h5-upload-status,.h5-create-preview .h5-upload-status{margin:12px 0 0;min-height:18px;text-align:center;overflow-wrap:anywhere;font-size:12px;line-height:1.5;color:#8a7b6e}
  .h5-current-preview{margin:0;border:1px solid #ece6dd;border-radius:20px;overflow:hidden;background:#f5f2ec}
  .h5-current-preview>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px}
  #h5PreviewContent{position:relative}
  .h5-current-preview #workbenchImageStatus{z-index:150;gap:6px;padding:10px;overflow:auto;pointer-events:auto;box-sizing:border-box;place-content:center;max-height:100%}
  .h5-current-preview .workbench-ai-visual,.h5-current-preview .workbench-image-progress{display:none}
  .h5-current-preview #workbenchImageHeading{font-size:15px;line-height:1.4}
  .h5-current-preview #workbenchImageStatusText,.h5-current-preview #workbenchImageStatusDetail{font-size:12px;line-height:1.4}
  .h5-current-preview #workbenchImageRetry{min-height:44px;margin:0;padding:8px 16px}
  .h5-current-preview h3{margin:0;font-size:12px;font-weight:500;line-height:1.4;color:#8a7b6e}
  .h5-current-preview #h5PreviewToggle{min-height:44px;padding:8px 4px;flex-shrink:0;border:0;background:transparent;color:#8a7b6e;font-size:12px}
  .h5-current-preview .product-preview{display:block;width:100%;min-height:0!important;height:auto!important;margin:0;padding:0!important;border:0;border-radius:0;box-shadow:none;box-sizing:border-box;background:transparent!important}
  .h5-current-preview .frame-stage{position:relative;width:100%;height:152px;min-height:0!important;padding:0;box-sizing:border-box;touch-action:pan-y}
  .h5-current-preview:not(.is-expanded) .frame-stage{pointer-events:none}
  .h5-current-preview .preview-caption,.h5-current-preview .preview-controls,.h5-current-preview .frame-label{display:none!important}
  .h5-current-preview.is-expanded .frame-stage{height:clamp(210px,min(68vw,calc(100svh - 350px)),340px)}
  .h5-current-preview.is-expanded .preview-controls{position:relative!important;inset:auto!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;transform:none;width:auto;margin:0;padding:8px 12px;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}
  .h5-current-preview .preview-controls .icon-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;max-width:none;min-width:0;min-height:58px;padding:0 4px;border:0!important;border-radius:0;background:transparent!important;box-shadow:none;color:#5b4a3b;font-size:11px;font-weight:500;white-space:normal}
  .h5-current-preview .preview-controls .icon-button::before{content:"";width:32px;height:32px;border:1px solid transparent;border-radius:50%;background:transparent center/19px 19px no-repeat;box-shadow:none}
  .h5-current-preview .preview-controls .icon-button.active{color:#493528;font-weight:700}
  .h5-current-preview #fitImageButton::before{background-image:url('/assets/h5-home/action-product.svg')}
  .h5-current-preview #lightToggle::before{background-image:url('/assets/h5-home/action-light.svg')}
  .h5-current-preview #resetViewButton::before{background-image:url('/assets/h5-home/action-rotate.svg')}
  .h5-current-preview #homeSceneButton::before{background-image:url('/assets/h5-home/action-product.svg')}
  .h5-current-preview #clearButton,.h5-current-preview #lightMaskDebug{display:none!important}
  .h5-current-preview .h5-preview-note{margin:0;padding:2px 12px 10px;font-size:11px;line-height:1.5;text-align:center;color:#998875}
  .h5-recommendations{display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;max-width:100%;padding:10px 2px 14px;scrollbar-width:thin;scrollbar-color:#d9c8b3 transparent}
  .h5-recommendations a{scroll-margin-bottom:calc(80px + env(safe-area-inset-bottom));scroll-snap-align:start;flex:0 0 88px;display:flex;flex-direction:column;align-items:center;min-width:0;text-decoration:none;color:inherit;background:transparent;border:0;text-align:center}
  .h5-theme-icon,.h5-all-themes-icon{display:block;width:72px;height:72px;max-width:100%;object-fit:cover;border:1px solid #e6dbcb;border-radius:22px;box-shadow:0 5px 16px #45301f0d;box-sizing:border-box;background:#f4ede4}
  .h5-theme-icon{position:relative;overflow:hidden;display:grid;place-items:center;color:#8d6e56}
  .h5-theme-icon img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
  .h5-theme-icon img[hidden]{display:none}
  .h5-home .h5-theme-scroll-hint{margin:0 0 14px;color:#9b8b7b;font-size:11px}
  .h5-recommendations .h5-theme-loading{margin:10px 0;min-height:72px}
  .h5-all-themes-icon{display:grid;place-items:center;color:#956c40;background:linear-gradient(145deg,#fffaf2,#eadcc9);font-size:42px;line-height:1}
  .h5-recommendations strong,.h5-recommendations small{display:block;max-width:100%;margin:9px 0 0;line-height:1.5;overflow-wrap:anywhere}
  .h5-recommendations strong{font-size:12px;font-weight:600}
  .h5-recommendations small{margin-top:3px;color:#8d6e56;font-size:11px}
  .h5-recommendation-head{display:flex;align-items:center;justify-content:space-between;margin:20px 0 0;gap:10px;min-height:44px}
  .h5-recommendation-head h3{margin:0;font-size:16px;font-weight:700}
  .h5-recommendation-head a{display:flex;align-items:center;min-height:44px;gap:5px;color:#8f8174;font-size:12px;text-decoration:none}
  .h5-workspace[data-h5-mode="themes"] .editor>*:not(#aiImageCreationPanel),.h5-workspace[data-h5-mode="themes"] #aiImageCreationPanel>*:not(#aiFunThemePanel){display:none!important}
  .h5-workspace[data-h5-mode="themes"] #aiImageCreationPanel{padding:0;border:0;background:transparent}
  .h5-workspace[data-h5-mode="themes"] #aiFunThemePanel{display:block;position:static;inset:auto;transform:none;width:100%;height:auto;max-height:none;padding:16px 0;background:transparent;box-shadow:none;border:0}
  .h5-workspace[data-h5-mode="themes"] #aiFunThemeToggle,.h5-workspace[data-h5-mode="themes"] #aiThemePanelBackdrop,.h5-workspace[data-h5-mode="themes"] .ai-fun-theme-view-switch{display:none!important}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-viewport{height:auto;max-height:none;overflow:visible;mask-image:none}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px;max-height:none!important;height:auto;overflow:visible;padding:0;mask-image:none}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-card{display:flex!important;flex-direction:column;align-items:stretch;min-width:0!important;width:100%!important;height:auto!important;min-height:240px;padding:0 0 14px;overflow:hidden;gap:10px;text-align:left;white-space:normal}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-icon{width:100%!important;height:145px!important;min-height:145px;aspect-ratio:auto;margin:0;border-radius:0}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-icon img{width:100%;height:100%;object-fit:cover}
  .h5-workspace[data-h5-mode="themes"] .ai-creation-copy{min-width:0;display:flex;flex:1;flex-direction:column;padding:0 12px;gap:6px}
  .h5-workspace[data-h5-mode="themes"] .ai-creation-copy strong{font-size:15px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
  .h5-workspace[data-h5-mode="themes"] .ai-creation-copy small{font-size:12px;line-height:1.5;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-card-meta{display:flex;flex-wrap:wrap;gap:4px;margin-top:auto;opacity:1;position:static;transform:none;font-size:12px}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-card-meta i{display:none}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-categories{display:flex;overflow-x:auto;flex-wrap:nowrap;max-width:100%;padding:6px 0}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-categories button{flex-shrink:0;min-height:44px}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-category-row,.h5-workspace[data-h5-mode="themes"] .ai-fun-theme-filter-row{display:block;min-width:0}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-filter-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px 0 16px}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-filter-select{min-width:0;width:auto}
  .h5-workspace[data-h5-mode="themes"] select{width:100%;min-width:0;min-height:44px}
  .h5-workspace .ai-theme-loading{grid-column:1/-1;white-space:normal}
  .h5-workspace[data-h5-mode="themes"] .editor{padding:0}
  .h5-workspace[data-h5-mode="themes"] #aiFunThemeTitle{font-size:23px;line-height:1.4;color:#25483a}
  .h5-workspace[data-h5-mode="themes"] #aiFunThemeSubtitle{font-size:13px;line-height:1.6;margin-top:6px}
  .h5-workspace[data-h5-mode="themes"] #h5ThemeLoadError{font-size:14px;line-height:1.6}
  .h5-workspace[data-h5-mode="themes"] #h5ThemeLoadError button{min-height:44px;margin:8px}
  /* Mobile theme library follows the mini-program's tabs, tools and compact cards. */
  .h5-workspace[data-h5-mode="themes"] #aiFunThemePanel{padding:12px 0;background:#fffdf9;border-radius:16px}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-heading-copy{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;width:100%}
  .h5-workspace[data-h5-mode="themes"] #aiFunThemeTitle{font-size:18px;color:#342a22}
  .h5-workspace[data-h5-mode="themes"] #aiFunThemeSubtitle{font-size:11px;margin:0;text-align:right;color:#8b8074}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-creation-heading{margin:0;padding:0 10px 6px}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-control-label,.h5-workspace[data-h5-mode="themes"] .ai-fun-theme-filter-row{display:none}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-categories{padding:0 4px;gap:0;scrollbar-width:none;box-sizing:border-box}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-categories::-webkit-scrollbar{display:none}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-categories button{position:relative;flex:1;min-width:46px;min-height:44px;padding:0 6px;border:0;border-radius:0;background:transparent;box-shadow:none;color:#5f554c;font-size:13px;font-weight:500}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-categories button.active{color:#80501f;font-weight:700;background:transparent}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-categories button.active:after{content:"";position:absolute;bottom:3px;left:30%;right:30%;height:2px;background:#aa742e;border-radius:2px}
  .h5-workspace[data-h5-mode="themes"] .h5-library-tools{display:flex;align-items:center;gap:8px;padding:8px 10px;border-top:1px solid #eee7dd;border-bottom:1px solid #eee7dd}
  .h5-library-tools>label{margin-right:auto;max-width:45%;width:auto}
  .h5-workspace .h5-library-tools select{font-size:12px!important;padding:0 24px 0 10px}
  .h5-library-tools button,.h5-library-tools select{min-height:44px;border:1px solid #e9e0d5;border-radius:24px;background:#fffcf8;color:#68584b;white-space:nowrap;font-size:12px;padding:0 12px}
  .h5-library-tools #h5FreeThemes{color:#65806a;border-color:#d8e5d3}
  .h5-library-tools #h5FreeThemes[aria-pressed="true"]{background:#edf5ea;border-color:#9ab78e}
  .h5-library-tools .is-active{background:#fff2dc;border-color:#b98d4a}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-grid{gap:10px;padding:10px;box-sizing:border-box}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-card{min-height:0;padding:0;gap:0;border:1px solid #e8dfd2;border-radius:12px;background:#fffdf9;box-shadow:0 4px 10px #4f372208}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-icon{height:auto!important;min-height:0;aspect-ratio:1.5;flex:none;background:#eee8df}
  .h5-workspace[data-h5-mode="themes"] .ai-creation-copy{padding:10px 8px;gap:5px}
  .h5-workspace[data-h5-mode="themes"] .ai-creation-copy strong{font-size:13px;line-height:1.4}
  .h5-workspace[data-h5-mode="themes"] .ai-creation-copy>small{display:none}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-card-meta{font-size:10px;line-height:1.5;margin:0}
  .h5-workspace[data-h5-mode="themes"] .ai-fun-theme-card-meta b{font-size:10px;white-space:normal;font-weight:500}
  .h5-theme-filter-sheet[open]{position:fixed;inset:auto 0 0;width:100%;max-width:520px;max-height:85dvh;margin:0 auto;box-sizing:border-box;overflow:auto;border-radius:24px 24px 0 0;background:#fffdf9;color:#342a22;padding:18px 18px calc(18px + env(safe-area-inset-bottom))}
  .h5-theme-filter-sheet::backdrop{background:#231c164d}
  .h5-theme-filter-sheet header,.h5-theme-filter-sheet footer{display:flex;justify-content:space-between;align-items:center;gap:12px}
  .h5-theme-filter-sheet button{min-height:44px;padding:8px 18px;border:1px solid #e0d2bd;border-radius:22px;background:#fff9ef;color:#684728;font-size:14px}
  .h5-theme-filter-sheet footer button{flex:1}
  .h5-theme-filter-sheet #h5ApplyFilters{background:#493528;color:#fffaf3}
  .h5-filter-fields{display:grid;gap:20px;padding:20px 0}
  .h5-filter-fields label{display:grid;gap:10px;width:100%}
  .h5-filter-fields .sr-only{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:normal;font-size:14px}
  .h5-filter-fields select{width:100%;min-height:48px;padding:8px 12px;border:1px solid #e0d2bd;border-radius:12px;background:#fff;color:#342a22;font-size:16px}
  .sunrise-memory-modal,.guardian-stone-modal{padding:0;color-scheme:dark}
  .guardian-stone-input>.guardian-direction-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .sunrise-memory-dialog,.guardian-stone-dialog{display:flex!important;flex-direction:column;width:100%!important;height:100dvh!important;max-height:100dvh!important;min-width:0;border-radius:0;overflow:hidden;box-sizing:border-box}
  .sunrise-memory-header,.guardian-stone-dialog>header{height:auto;min-height:82px;flex-shrink:0;padding:12px 16px!important;gap:10px;box-sizing:border-box}
  .sunrise-memory-header h2,.guardian-stone-dialog>header h2{font-size:24px}
  .sunrise-memory-header span,.guardian-stone-dialog>header span{font-size:9px;letter-spacing:.12em}
  .sunrise-memory-header p,.guardian-stone-dialog>header p{display:none}
  .sunrise-memory-header>div:last-child,.guardian-stone-dialog>header>div:last-child{display:flex;gap:4px;flex-shrink:0}
  #sunriseMemoryLatest,#guardianStoneRecent{display:block!important;font-size:11px;max-width:78px;white-space:normal;padding:4px 6px}
  .sunrise-memory-body,.guardian-stone-body{display:flex!important;flex-direction:column;flex:1;min-height:0;height:auto!important;overflow:auto;overscroll-behavior:contain;scroll-padding:20px}
  .sunrise-memory-form,.sunrise-memory-preview-column,.guardian-stone-body>main,.guardian-stone-body>aside{flex-shrink:0;width:100%;min-width:0;min-height:0!important;overflow:visible!important;padding:20px 16px 28px!important;box-sizing:border-box}
  .sunrise-memory-actions{position:static;grid-template-columns:1fr;bottom:auto}
  .sunrise-memory-options{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sunrise-memory-option{padding:12px 10px;min-height:74px}
  .sunrise-memory-option small{font-size:12px}
  .sunrise-memory-calculation dd{white-space:normal;overflow-wrap:anywhere}
  .sunrise-memory-preview>img{object-fit:contain}
  .sunrise-memory-product-actions{grid-template-columns:1fr 1fr}
  .sunrise-memory-preview-column{display:flex;flex-direction:column}
  .sunrise-memory-preview-heading{order:0}
  .sunrise-memory-frame{order:1}
  .sunrise-memory-preview-column>.h5-result-links{order:2;width:100%;max-width:435px;margin:auto}
  .sunrise-memory-light-switch{order:3}
  .sunrise-memory-editor{order:4}
  .sunrise-memory-product-actions{order:5}
  .sunrise-memory-note{order:6}
  .guardian-stone-dialog>footer{flex-shrink:0;height:auto!important;min-height:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom))!important;gap:8px;background:#141916}
  .guardian-stone-dialog>footer p{margin:0;max-height:64px;overflow:auto;line-height:1.5;font-size:12px}
  .guardian-stone-dialog>footer>div{display:flex;width:100%;gap:8px}
  .guardian-stone-dialog footer button{min-height:46px;white-space:normal}
  .guardian-stone-artwork{min-height:0!important;display:flex;flex-direction:column;overflow:visible}
  .guardian-stone-artwork>img{height:auto;max-height:none;object-fit:contain}
  .guardian-stone-light-toggle,.guardian-stone-final-caption,.guardian-stone-result-actions,.guardian-stone-ready{position:static!important;transform:none!important;width:auto;margin:12px;max-width:100%;box-sizing:border-box}
  .guardian-stone-result-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px}
  .guardian-stone-result-actions button{white-space:normal;min-height:44px}
  .h5-result-links{display:flex;flex-wrap:wrap;gap:8px;padding:14px 0}
  .h5-result-links a,.h5-result-links button{flex:1;min-height:46px;display:grid;place-items:center;color:#eee5d7;background:#253e31;border:1px solid #6c805f;border-radius:12px;text-decoration:none;font-size:14px}
  .h5-workspace input,.h5-workspace textarea,.h5-workspace select,.h5-account input,.h5-account select{font-size:16px!important;box-sizing:border-box;max-width:100%;scroll-margin:24px}
  .h5-workspace .auth-modal{z-index:4500;padding:12px;box-sizing:border-box;overflow:auto}
  .h5-workspace .auth-modal-card,.h5-workspace .auth-card{max-width:100%;width:100%;max-height:calc(100dvh - 24px);overflow:auto;padding:24px 20px;box-sizing:border-box}
  .h5-workspace .auth-modal-close{position:sticky;top:0;float:right;z-index:2;min-width:44px;min-height:44px}
  .h5-workspace .ai-theme-switch-confirm-card,.h5-account .original-download-dialog{width:100%;max-width:100%;max-height:90dvh;overflow:auto;box-sizing:border-box}
  .h5-account{min-width:0}
  .h5-account .account-shell{display:block;min-width:0;padding:16px;max-width:100%;box-sizing:border-box}
  .h5-account .account-topbar{padding:12px 16px;gap:12px;flex-wrap:wrap}
  .h5-account .account-top-actions{flex-wrap:wrap;gap:8px}
  .h5-account .account-cooperation-links,.h5-account #accountCloudCenter,.h5-account .account-about-card,.h5-account .memory-walk-card{display:none}
  .h5-account .account-sidebar{position:static;padding:12px;min-width:0}
  .h5-account #accountNav{display:flex;overflow:auto;max-width:100%;gap:8px}
  .h5-account #accountNav button{width:auto;flex-shrink:0;min-height:44px;white-space:nowrap;padding:8px 14px;font-size:14px}
  .h5-account .account-sidebar-stack{margin-bottom:16px;min-width:0}
  .h5-account .ai-creation-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .h5-account .ai-creation-card,.h5-account .account-content{min-width:0}
  .h5-account .ai-creation-body{padding:12px}
  .h5-account .ai-creation-body h2{white-space:normal;font-size:15px;overflow-wrap:anywhere}
  .h5-account .ai-creation-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}
  .h5-account .ai-creation-actions a,.h5-account .ai-creation-actions button,.h5-account .ai-creation-actions summary{min-height:44px;white-space:normal;box-sizing:border-box}
  .h5-account [data-mobile-creation]{display:none}
  .h5-account .creation-toolbar{flex-wrap:wrap;gap:12px}
  .h5-account .creation-filters{display:flex;flex-wrap:nowrap;overflow:auto;max-width:100%}
  .h5-account .creation-filters button{flex-shrink:0;min-height:44px}
  .h5-account .creative-recharge-options{grid-template-columns:1fr 1fr}
  .h5-account .creative-recharge-payment{display:none!important}
  .h5-account .original-download-unlock-overlay{padding:12px;box-sizing:border-box}
  .h5-account .original-download-unlock-dialog{width:100%;max-height:calc(100dvh - 24px);overflow:auto;padding:24px 18px;box-sizing:border-box}
  .h5-account .original-download-unlock-close{position:sticky;top:0;float:right;min-width:44px;min-height:44px}
  .h5-account .share-center-modal,.h5-workspace .share-center-modal{z-index:4600;max-height:100dvh;overflow:auto}
  .h5-account .hk-share-overlay,.h5-workspace .hk-share-overlay{z-index:4600;padding:12px;box-sizing:border-box}
  .h5-account .hk-share-panel,.h5-workspace .hk-share-panel{width:100%;max-height:calc(100dvh - 24px);padding:24px 18px;box-sizing:border-box}
  .h5-account .hk-share-close,.h5-workspace .hk-share-close{position:sticky;top:0;float:right;z-index:2;min-height:44px;min-width:44px}
  .h5-image-viewer{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
  .h5-workspace:has(.sunrise-memory-modal:not(.hidden)),.h5-workspace:has(.guardian-stone-modal:not(.hidden)),body:has(.h5-image-viewer:not([hidden])){overflow:hidden}
  .h5-keyboard .guardian-stone-dialog{height:var(--h5-visible-height,100dvh)!important}
  .guardian-stone-modal.has-artwork .guardian-stone-body>aside{order:-1}
  .h5-account .h5-detail-actions{display:grid;grid-template-columns:1fr 1fr}
}
@media(max-width:359px){.h5-workspace[data-h5-mode="themes"] .ai-fun-theme-grid,.h5-account .ai-creation-grid{grid-template-columns:1fr!important}}
@media(prefers-reduced-motion:reduce){.h5-workspace .sunrise-memory-generating>i{animation:none}}
