:root{--page:#faf8f3;--ink:#302e29;--muted:#756b5e;--border:#e5dccf;--accent:#415c4e;--surface:#fff;--font-size:16px}*{box-sizing:border-box}body{font:var(--font-size)/1.55 system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--page);min-width:0;max-width:1500px;margin:auto;padding:24px clamp(16px,3vw,40px) 48px}h1{font-size:24px;letter-spacing:-.03em;margin:0}button{min-height:42px}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,.item:focus-visible{outline:2px solid #557c6b;outline-offset:3px}.list-head{gap:12px;margin-bottom:16px}.list-head button{min-width:44px;font-size:20px}#search{font-size:16px;padding:12px 14px}#list-filters,#image-tags-filter{margin-top:14px;gap:7px;overflow-x:auto;scrollbar-width:none}#list-filters::-webkit-scrollbar,#image-tags-filter::-webkit-scrollbar{display:none}.list-filters button{margin:0;border-radius:22px;padding:8px 14px;font-size:14px}.list-filters button[aria-pressed=true]{background:var(--accent)}#list-status{margin:18px 0 12px;color:var(--muted);font-size:14px}#items{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px}.item{padding:12px;margin:0;border-color:var(--border);border-radius:10px}.item-media{min-height:150px;background:#eae7de}.item-media img{height:190px}.item h2{font-size:16px;line-height:1.45;overflow-wrap:anywhere;margin:10px 0 6px}.item small{font-size:13px}.item-actions{top:20px;right:20px}.item-actions button{min-height:38px;border:1px solid #eee;background:#fffc}.item-media .item-prompt{line-height:1.5;font-size:14px;max-height:68px}.detail-image{margin:0;border-radius:8px;max-height:52vh}.detail-prompt{font-size:16px}.detail-source{color:var(--accent)}dialog#detail-view{width:min(880px,calc(100% - 24px));max-height:calc(100% - 24px);border:1px solid var(--border);border-radius:12px;padding:22px;background:var(--page);color:var(--ink)}dialog#detail-view::backdrop{background:#1a2920a8}#detail-view .list-head button{background:transparent;color:var(--ink);padding:0;font-size:28px}#detail-content h2{font-size:22px;line-height:1.4}#detail-content h3{font-size:16px;margin:22px 0 10px}#edit-view{max-width:720px;margin:auto}#edit-view small{display:block;line-height:1.6}#edit-view input,#edit-view textarea,#edit-view select{font-size:16px;padding:10px}#tag-options{margin-top:10px;gap:10px 16px}#tag-options label{display:flex;align-items:center;gap:4px}#preview{width:100%;max-height:320px;object-fit:contain;border-radius:8px}#save{width:100%;margin-top:22px}@media(max-width:700px){body{padding:18px 16px 36px}#items{grid-template-columns:1fr}.item-media img{height:180px}}@media(hover:none){.item-actions{opacity:1}}@media(prefers-reduced-motion:reduce){.item-actions{transition:none}}

.sync-line{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px;color:var(--muted);font-size:13px}.sync-line button{margin:0;min-height:34px;padding:4px 10px;background:transparent;color:var(--accent);border:1px solid var(--border);font-size:13px}.sync-line button:disabled{opacity:.55}#list-status{margin-top:10px}

#deletion-status{font-size:13px;color:var(--muted)}#deletion-status p{margin:10px 0}.deletion-error{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0;padding:9px 12px;border:1px solid #e7c8ae;border-radius:8px;background:#fff5eb;color:#83553b}.deletion-error button{min-height:34px;flex-shrink:0;margin:0;padding:5px 12px;font-size:13px}

.item-media:has(.item-prompt:not(:empty))::after{content:"";position:absolute;inset:auto 0 0;height:90px;background:linear-gradient(transparent,rgba(0,0,0,.8));pointer-events:none}.item-media .item-prompt{z-index:1;left:12px;right:12px;bottom:10px;padding:0;background:none;line-height:1.5;max-height:3em;overflow:hidden;overflow-wrap:anywhere;-webkit-line-clamp:2}.item-media .item-prompt:empty{display:none}

.prompt-legend{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:8px 0 10px}.prompt-legend small{font-size:12px;color:#706d66;margin-left:4px}.prompt-key{font-size:12px;font-weight:600;line-height:1.4;padding:3px 8px;border-radius:5px}.prompt-mark{border-radius:3px;padding:1px 2px;box-decoration-break:clone;-webkit-box-decoration-break:clone}.prompt-key-subject,.prompt-mark-subject{background:#f5ddd5;color:#713d31}.prompt-key-style,.prompt-mark-style{background:#e9dff2;color:#584173}.prompt-key-ratio,.prompt-mark-ratio{background:#dce9f2;color:#31566c}.prompt-key-light,.prompt-mark-light{background:#f4e8c9;color:#71561e}.prompt-key-composition,.prompt-mark-composition{background:#dcebdc;color:#395e43}

.prompt-key-scene,.prompt-mark-scene{background:#dcebe4;color:#315a48}.prompt-key-detail,.prompt-mark-detail{background:#f2e0d0;color:#704d32}.prompt-key-quality,.prompt-mark-quality{background:#e4e5ed;color:#494e67}.prompt-key-negative,.prompt-mark-negative{background:#f3d9dc;color:#823f4a}

.prompt-key-purpose,.prompt-mark-purpose{background:#f5e0b9;color:#704a15}

.prompt-key-reference,.prompt-mark-reference{background:#dae8f5;color:#315574}.prompt-key-mood,.prompt-mark-mood{background:#eae0e9;color:#694a66}
