.reference-history{min-width:0;min-height:100vh;background:#020617;color:#cbd5e1;line-height:1.5}.reference-history *{box-sizing:border-box;min-width:0}.reference-history button,.reference-history input,.reference-history select{font:inherit}.reference-history button{cursor:pointer}.reference-history button:disabled{opacity:.45;cursor:not-allowed}.reference-history button:focus-visible,.reference-history input:focus-visible,.reference-history select:focus-visible{outline:2px solid #14b8a6;outline-offset:2px}.reference-history svg{flex-shrink:0}.history-layout-container{width:100%;max-width:1536px;margin:0 auto;padding:24px 16px}.history-reference-top{border-bottom:1px solid hsla(0,0%,100%,.058823529411764705);background:#020617}.history-page-heading{display:flex;flex-direction:column;align-items:flex-start;gap:20px}.history-page-heading>.history-heading-copy{max-width:48rem}.history-heading-summary{display:flex;flex-wrap:wrap;gap:8px;flex-shrink:0}.history-storage-label{display:inline-flex;align-items:center;gap:8px;margin-bottom:12px;padding:4px 12px;border:1px solid rgba(20,184,166,.2);border-radius:999px;background:rgba(20,184,166,.10196078431372549);color:#14b8a6;font-size:12px;line-height:16px;font-weight:500}.history-storage-label>svg{display:block;width:14px;height:14px}.reference-history .history-page-heading h1{font-size:24px;line-height:32px;font-weight:600;letter-spacing:0;color:#fff;margin:0}.history-page-heading p{max-width:none;margin:8px 0 0;font-size:14px;line-height:24px;font-weight:400;letter-spacing:normal;color:#94a3b8}.history-count{flex-shrink:0;white-space:nowrap;padding:6px 12px;border:1px solid hsla(0,0%,100%,.10196078431372549);border-radius:999px;background:hsla(0,0%,100%,.0392156862745098);font-size:12px;line-height:16px}.history-reference-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:24px}.history-search{display:grid;grid-template-columns:minmax(0,448px) max-content;gap:12px;margin:0;align-items:center}.history-search>label{position:relative;display:block}.history-search>label>svg{position:absolute;left:12px;top:12px;width:16px;height:16px;color:#64748b}.history-search input{display:block;width:100%;height:40px;padding:8px 36px;border:1px solid hsla(0,0%,100%,.10196078431372549);border-radius:8px;background:hsla(0,0%,100%,.0392156862745098);color:#fff;font-size:14px;line-height:20px}.history-search input::-moz-placeholder{color:#64748b}.history-search input::placeholder{color:#64748b}.history-reference-actions>button,.history-reference-select,.history-search>button{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;min-height:40px;padding:8px 12px;border:1px solid hsla(0,0%,100%,.10196078431372549);border-radius:8px;background:hsla(0,0%,100%,.0392156862745098);color:#f1f5f9;font-size:14px;line-height:20px;font-weight:500;white-space:nowrap}.history-reference-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%}.history-reference-select select{max-width:160px;padding:0 4px;border:0;background:transparent;color:inherit;font-size:14px;line-height:20px;cursor:pointer}.history-reference-select option{background:#0f172a;color:#fff}.history-reference-actions>button.active,.history-reference-actions>button:hover{background:rgba(20,184,166,.10196078431372549);border-color:rgba(20,184,166,.34901960784313724)}.history-reference-actions>.history-expired-action{background:rgba(251,191,36,.10196078431372549);border-color:rgba(251,191,36,.25098039215686274);color:#fef3c7}.history-reference-actions>.history-clear-action{background:rgba(239,68,68,.10196078431372549);border-color:rgba(248,113,113,.25098039215686274);color:#fee2e2}.history-reference-actions>.history-favorite-filter.active{background:rgba(251,113,133,.10196078431372549);border-color:rgba(251,113,133,.34901960784313724);color:#ffe4e6}.history-action-notice{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;margin-bottom:24px;border:1px solid rgba(20,184,166,.25098039215686274);border-radius:8px;background:rgba(20,184,166,.10196078431372549);font-size:14px;line-height:20px}.history-action-notice button{background:none;color:#94a3b8;font-size:20px}.reference-history .gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.history-skeleton,.reference-history .gallery-item{position:relative;overflow:hidden;border:1px solid hsla(0,0%,100%,.0784313725490196);border-radius:8px;background:rgba(2,6,23,.7019607843137254);text-align:left}.reference-history .gallery-item{cursor:pointer}.reference-history .gallery-item.selected,.reference-history .gallery-item:hover{border-color:rgba(20,184,166,.5019607843137255)}.reference-history .item-media{position:relative;aspect-ratio:4/3;overflow:hidden;background:#0f172a}.reference-history .item-media>img,.reference-history .item-media>video,.reference-history .item-music-cover-wrap,.reference-history .item-music-cover-wrap>img{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.reference-history .item-placeholder{display:grid;place-items:center;height:100%;color:#475569}.reference-history .item-overlay{display:none}.history-favorite,.history-select-item{position:absolute;right:8px;top:8px;z-index:2;display:grid;place-items:center;width:32px;height:32px;padding:0;background:rgba(2,6,23,.7019607843137254);color:#fff;border:1px solid hsla(0,0%,100%,.14901960784313725);border-radius:8px;font-size:20px!important}.history-favorite[aria-pressed=true],.history-select-item[aria-pressed=true]{color:#5eead4;border-color:#14b8a6}.reference-history .item-info{padding:16px}.history-card-heading{display:flex;align-items:center;gap:10px;margin-bottom:16px}.history-card-icon{display:grid;place-items:center;width:32px;height:32px;flex-shrink:0;border:1px solid hsla(0,0%,100%,.058823529411764705);border-radius:8px;background:hsla(0,0%,100%,.0392156862745098)}.history-card-icon img{width:20px;height:20px;-o-object-fit:contain;object-fit:contain}.history-card-heading>div{flex:1}.history-card-heading strong{display:block;font-size:14px;font-weight:500;line-height:20px;color:#e2e8f0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-card-heading time{display:block;margin-top:4px;font-size:11px;line-height:16px;color:#64748b}.reference-history .item-status{flex-shrink:0;font-size:10px;line-height:16px;padding:2px 6px;border:1px solid hsla(0,0%,100%,.10196078431372549);border-radius:999px}.reference-history .status-pending{background:rgba(245,158,11,.14901960784313725);color:#fcd34d}.reference-history .status-finish{background:rgba(16,185,129,.14901960784313725);color:#6ee7b7}.reference-history .status-failed{background:rgba(239,68,68,.14901960784313725);color:#fca5a5}.reference-history .item-prompt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-size:14px;line-height:24px;color:#94a3b8;min-height:48px;margin:0 0 16px}.history-card-actions,.reference-history .preview-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.history-card-actions button,.reference-history .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 10px;min-height:36px;border:1px solid hsla(0,0%,100%,.10196078431372549);border-radius:8px;background:hsla(0,0%,100%,.0392156862745098);color:#cbd5e1;font-size:12px;line-height:16px}.history-card-actions button:hover,.reference-history .btn:hover{border-color:rgba(20,184,166,.34901960784313724);background:rgba(20,184,166,.10196078431372549)}.reference-history .gallery-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;min-height:320px;padding:40px 16px;border:1px solid hsla(0,0%,100%,.058823529411764705);border-radius:8px;background:hsla(0,0%,100%,.011764705882352941);color:#94a3b8;text-align:center}.reference-history .gallery-empty .btn-primary{background:#14b8a6;color:#09090b;border:0;min-height:44px;font-size:14px}.reference-history .gallery-load-more{text-align:center;padding:24px 0}.reference-history .gallery-load-more .btn{min-height:40px;padding:8px 16px;font-size:14px}.reference-history .gallery-empty h2{margin:16px 0 0;color:#fff;font-size:16px;font-weight:600;line-height:24px}.reference-history .gallery-empty p{max-width:448px;margin:8px 0 16px;font-size:14px;line-height:24px}.history-skeleton-media{aspect-ratio:4/3;background:rgba(30,41,59,.7019607843137254);animation:history-pulse 1.8s ease-in-out infinite}.history-skeleton-info{display:flex;flex-direction:column;gap:16px;padding:16px}.history-skeleton-info>div{height:12px;background:#1e293b;border-radius:4px}.history-skeleton-info>.history-skeleton-model{width:70%;height:32px}.history-skeleton-info footer{display:flex;gap:8px}.history-skeleton-info footer span{width:80px;height:32px;border-radius:8px;background:#1e293b}@keyframes history-pulse{50%{opacity:.5}}.reference-history .modal-overlay{position:fixed;inset:0;z-index:1800;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(0,0,0,.7333333333333333);backdrop-filter:blur(4px)}.reference-history .preview-modal{position:relative;display:flex;flex-direction:column;width:100%;max-width:1024px;max-height:90dvh;overflow:hidden;border:1px solid hsla(0,0%,100%,.10196078431372549);border-radius:16px;background:#0f172a;box-shadow:0 25px 60px rgba(0,0,0,.4666666666666667)}.reference-history .modal-close{position:absolute;right:12px;top:12px;z-index:3;display:grid;place-items:center;width:40px;height:40px;border:1px solid hsla(0,0%,100%,.10196078431372549);border-radius:8px;background:rgba(2,6,23,.7019607843137254);color:#fff;font-size:24px}.reference-history .preview-content{display:flex;align-items:center;justify-content:center;height:50dvh;min-height:160px;overflow:hidden;background:#020617}.reference-history .preview-content>img,.reference-history .preview-content>video{display:block;max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.reference-history .preview-info{flex-shrink:0;max-height:35dvh;overflow:auto;padding:20px;border-top:1px solid hsla(0,0%,100%,.10196078431372549)}.reference-history .preview-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.reference-history .preview-model{font-size:12px;line-height:16px;padding:4px 8px;background:rgba(20,184,166,.10196078431372549);color:#5eead4;border-radius:6px}.reference-history .preview-date{font-size:12px;color:#94a3b8}.reference-history .preview-prompt{font-size:14px;line-height:24px;white-space:pre-wrap;overflow-wrap:anywhere;color:#cbd5e1;margin-bottom:16px}.reference-history .preview-download-hint{font-size:12px;line-height:20px;color:#94a3b8;margin-bottom:12px}.reference-history .preview-actions .btn{min-height:40px;font-size:14px}.reference-history .preview-actions .btn:last-child{background:rgba(20,184,166,.14901960784313725);border-color:rgba(20,184,166,.25098039215686274);color:#5eead4}.preview-music-wrap{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.preview-music-cover{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.preview-music-play-btn{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:64px;height:64px;display:grid;place-items:center;background:rgba(2,6,23,.7019607843137254);border:1px solid hsla(0,0%,100%,.14901960784313725);border-radius:50%;color:#fff}.preview-music-track-tabs{display:flex;justify-content:center;gap:8px;margin-bottom:16px}.preview-track-tab{padding:6px 12px;border:1px solid hsla(0,0%,100%,.10196078431372549);border-radius:8px;background:hsla(0,0%,100%,.0392156862745098);color:#94a3b8;font-size:12px}.preview-track-tab.active{background:rgba(20,184,166,.14901960784313725);border-color:rgba(20,184,166,.34901960784313724);color:#5eead4}@media(min-width:1536px){.reference-history .gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:1199px){.reference-history .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:768px){.reference-history .history-page-heading h1{font-size:30px;line-height:36px}}@media(min-width:1024px){.history-page-heading{flex-direction:row;align-items:flex-end;justify-content:space-between}}@media(max-width:767px){.history-search{grid-template-columns:minmax(0,1fr) max-content}.history-reference-actions>button,.history-reference-select{font-size:12px;padding:8px 10px}.reference-history .modal-overlay{padding:12px}.reference-history .preview-info{padding:16px}.history-card-heading{flex-wrap:wrap}.history-card-heading>.item-status{margin-left:42px}}@media(max-width:479px){.reference-history .gallery-grid{grid-template-columns:minmax(0,1fr)}.history-reference-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.history-reference-actions>button,.history-reference-select{white-space:normal;min-height:40px}.history-expired-action{grid-column:1/-1}.history-reference-select select{width:100%;max-width:100%}.reference-history .gallery-empty{min-height:260px}}@media(prefers-reduced-motion:reduce){.history-skeleton-media{animation:none}}.reference-history.compact-history{min-height:0;background:none}.compact-history-header h2{position:relative;margin:0 0 12px;padding:0 0 8px;border-bottom:1px solid var(--border-color);color:var(--text-primary);font-size:15px;font-weight:600}.compact-history-header h2:after{position:absolute;inset:auto auto -1px 0;width:2em;height:2px;border-radius:2px;background:var(--text-primary);content:""}.compact-history-header .history-reference-actions{display:flex;justify-content:flex-end}.compact-history-header .history-reference-actions>button{min-height:44px}.compact-history-header .history-reference-select{position:relative;min-height:44px;padding:0}.compact-history-header .history-reference-select:after{position:absolute;right:10px;top:calc(50% - 5px);width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);pointer-events:none;content:""}.compact-history-header .history-reference-select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:42px;min-width:0;max-width:34vw;padding:0 22px 0 8px;background:transparent;font-size:12px;text-overflow:ellipsis}.compact-history .history-layout-container{padding:12px 0 0}.reference-history.compact-history .gallery-grid{--history-card-gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--history-card-gap)}.compact-history .history-masonry{position:relative}.compact-history .history-masonry>.gallery-item{position:absolute;width:calc(50% - var(--history-card-gap)/2)}.reference-history.compact-history .item-info{padding:8px}.compact-history .history-card-heading{gap:6px;margin-bottom:8px}.compact-history .history-card-heading>.item-status{margin-left:0}.reference-history.compact-history .gallery-empty{min-height:220px;border:0;background:none}.reference-history.compact-history .gallery-empty svg{width:48px;height:48px;margin-bottom:0!important}.reference-history.compact-history .gallery-empty h2{color:#94a3b8}.compact-history .history-failure{margin:0 0 8px;color:#fca5a5;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.compact-history .history-failure-summary{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.compact-history .history-failed-card{align-self:start}.compact-history .history-failed-card>.history-favorite,.compact-history .history-failed-card>.history-select-item{top:auto;bottom:10px}.compact-history .history-failed-preview .preview-info{max-height:80dvh;padding-top:60px;border-top:0}.compact-history .preview-prompt{-webkit-user-select:text;-moz-user-select:text;user-select:text;-webkit-touch-callout:default}