:root {
  --ink: #173e35;
  --ink-soft: #31584f;
  --muted: #6c7772;
  --paper: #f5f3ed;
  --surface: #fffefa;
  --line: #d9d5cb;
  --coral: #ed755c;
  --coral-dark: #d85f48;
  --lime: #b7d976;
  --green: #4e9a69;
  --shadow: 0 12px 36px rgba(28, 52, 44, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: "Manrope", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.login-view { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(430px, .92fr) minmax(520px, 1.08fr); background: var(--surface); }
.login-card { position: relative; isolation: isolate; display: flex; flex-direction: column; width: min(570px, calc(100% - 80px)); margin: auto; padding: 52px 0; animation: login-rise 620ms cubic-bezier(.22, .68, .3, 1) both; }
.login-card::before { content: ""; position: absolute; z-index: -1; top: -140px; left: -180px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(183, 217, 118, .28), transparent 68%); pointer-events: none; }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: clamp(66px, 10vh, 108px); text-decoration: none; }
.login-brand > span:last-child { display: grid; gap: 3px; }
.login-brand strong { font-size: 15px; line-height: 1; letter-spacing: -.025em; }
.login-brand small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.login-card h1 { max-width: 560px; font-size: clamp(42px, 4.2vw, 64px); line-height: 1.03; }
.login-copy { max-width: 480px; margin: 25px 0 33px; color: var(--muted); font-size: 15px; line-height: 1.72; }
.google-sign-in { position: relative; display: flex; align-items: center; justify-content: center; gap: 13px; width: min(100%, 400px); min-height: 56px; padding: 0 20px; color: white; border: 0; border-radius: 12px; background: var(--ink); box-shadow: 0 10px 26px rgba(23, 62, 53, .16); font-size: 13px; font-weight: 800; letter-spacing: .01em; transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.google-sign-in:hover:not(:disabled) { transform: translateY(-2px); background: var(--ink-soft); box-shadow: 0 16px 34px rgba(23, 62, 53, .22); }
.google-sign-in:active:not(:disabled) { transform: translateY(0); box-shadow: 0 6px 16px rgba(23, 62, 53, .18); }
.google-sign-in:focus-visible { outline: 3px solid rgba(237, 117, 92, .32); outline-offset: 3px; }
.google-sign-in:disabled { cursor: progress; background: var(--ink-soft); box-shadow: none; }
.google-mark { display: grid; place-items: center; width: 26px; height: 26px; color: #4285f4; border-radius: 50%; background: white; font: 800 14px/1 Arial, sans-serif; }
.google-sign-in:disabled .google-mark { color: transparent; border: 2px solid rgba(255, 255, 255, .26); border-top-color: white; background: transparent; animation: spin 720ms linear infinite; }
.login-card:has(.login-status[data-type="error"]) .google-sign-in:disabled { cursor: not-allowed; opacity: .55; }
.login-card:has(.login-status[data-type="error"]) .google-sign-in:disabled .google-mark { color: #4285f4; border: 0; background: white; animation: none; }
.login-status { display: flex; align-items: center; gap: 9px; min-height: 18px; margin: 16px 0 0; color: var(--muted); font-size: 11px; }
.login-status::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; }
.login-status[data-type="error"] { color: #a94d43; }
.login-status[data-type="error"]::before { opacity: 1; background: var(--coral); box-shadow: 0 0 0 4px rgba(237, 117, 92, .14); }
.login-security { display: flex; align-items: center; gap: 8px; margin-top: clamp(52px, 8vh, 86px); color: var(--muted); font: 500 9px/1 "DM Mono", monospace; text-transform: uppercase; letter-spacing: .06em; }
.login-security i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(78, 154, 105, 0.12); }
.login-art { position: relative; display: grid; place-items: center; overflow: hidden; padding: clamp(50px, 8vw, 120px); background: var(--ink); isolation: isolate; }
.login-art::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(to bottom right, transparent, black 28%, black 65%, transparent); }
.login-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(4px); }
.login-glow-one { top: -150px; right: -110px; width: 430px; height: 430px; background: rgba(183, 217, 118, .24); }
.login-glow-two { bottom: -180px; left: -120px; width: 390px; height: 390px; background: rgba(237, 117, 92, .18); }
.workspace-preview { width: min(530px, 100%); padding: 27px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; background: rgba(255,254,250,.97); box-shadow: 0 38px 100px rgba(4,22,17,.38); transform: rotate(-1.5deg); animation: preview-rise 760ms cubic-bezier(.22, .68, .3, 1) both; }
.preview-topline { display: flex; align-items: center; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.preview-logo { display: grid; grid-template-columns: repeat(2, 7px); gap: 3px; transform: rotate(7deg); }
.preview-logo i { width: 7px; height: 7px; border-radius: 2px; background: var(--ink); }
.preview-logo i:nth-child(2), .preview-logo i:nth-child(3) { background: var(--coral); }
.private-pill { display: flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 99px; font: 600 8px/1 "DM Mono", monospace; letter-spacing: .04em; text-transform: uppercase; }
.private-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(78, 154, 105, .14); }
.preview-heading { padding: 35px 4px 27px; }
.preview-heading small { color: var(--coral); font: 600 8px/1 "DM Mono", monospace; letter-spacing: .15em; }
.preview-heading strong { display: block; margin-top: 10px; color: var(--ink); font-size: clamp(28px, 3vw, 39px); line-height: 1.04; letter-spacing: -.05em; }
.preview-items { display: grid; gap: 9px; }
.preview-items > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f8f6ef; }
.preview-icon { display: grid; place-items: center; width: 39px; height: 39px; color: var(--ink); border-radius: 9px; background: var(--lime); font: 600 9px/1 "DM Mono", monospace; }
.preview-icon.coral { color: white; background: var(--coral); }
.preview-icon.green { color: white; background: var(--ink); }
.preview-items p { display: grid; gap: 4px; margin: 0; }
.preview-items p strong { color: var(--ink); font-size: 11px; }
.preview-items p small { color: var(--muted); font-size: 9px; }
.preview-items > div > i { color: var(--coral); font-style: normal; }
.preview-filename { display: grid; gap: 8px; margin-top: 16px; padding: 13px; border: 1px dashed var(--line); border-radius: 12px; }
.preview-filename > span { color: var(--muted); font: 600 8px/1 "DM Mono", monospace; letter-spacing: .15em; }
.preview-filename code { color: var(--ink-soft); font: 400 10px/1.4 "DM Mono", monospace; word-break: break-word; }
.preview-filename code b { color: var(--ink); font-weight: 500; }
.preview-filename code i { color: var(--coral); font-style: normal; }
.art-caption { position: absolute; bottom: 34px; display: flex; align-items: center; gap: 9px; margin: 0; color: rgba(255,255,255,.58); font: 500 9px/1 "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.art-caption i { width: 24px; height: 1px; background: var(--coral); }
@keyframes login-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes preview-rise { from { opacity: 0; transform: rotate(-1.5deg) translateY(24px); } to { transform: rotate(-1.5deg) translateY(0); } }

.topbar { position: sticky; top: 0; z-index: 20; height: 72px; border-bottom: 1px solid rgba(23, 62, 53, 0.12); background: rgba(245, 243, 237, 0.92); backdrop-filter: blur(16px); }
.topbar-inner { width: min(1320px, calc(100% - 48px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 8px); gap: 3px; transform: rotate(7deg); }
.brand-mark i { width: 8px; height: 8px; border-radius: 2px; background: var(--ink); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--coral); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 15px; line-height: 1; letter-spacing: -0.025em; }
.brand-copy small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.header-context { display: flex; align-items: center; gap: 14px; }
.account-menu { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.account-menu span { max-width: 190px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu button { padding: 6px 9px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 9px; font-weight: 800; }
.account-menu button:hover { color: white; border-color: var(--ink); background: var(--ink); }
.workflow-pill { padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-soft); background: rgba(255, 254, 250, 0.7); font: 500 10px/1 "DM Mono", monospace; }
.connection { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.connection i, .sync-strip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(78, 154, 105, 0.12); }

.dashboard { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 72px; }
.overview { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(370px, 0.85fr); gap: 56px; align-items: stretch; padding: 38px 42px; border: 1px solid rgba(23, 62, 53, 0.12); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.overview::after { content: ""; position: absolute; right: -90px; top: -130px; width: 330px; height: 330px; border: 55px solid rgba(183, 217, 118, 0.2); border-radius: 50%; pointer-events: none; }
.overview-copy { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 15px; font: 500 10px/1 "DM Mono", monospace; letter-spacing: 0.15em; }
.eyebrow i { width: 44px; height: 1px; background: var(--coral); }
h1 { margin: 0; font-size: clamp(38px, 4.5vw, 63px); line-height: 0.98; letter-spacing: -0.065em; }
h1 em { color: var(--coral); font-family: Georgia, serif; font-weight: 400; }
.overview-copy > p:not(.eyebrow) { max-width: 640px; margin: 18px 0 0; color: #596b65; font-size: 15px; line-height: 1.65; }
.automation-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.automation-note svg { width: 16px; fill: none; stroke: var(--coral); stroke-width: 1.7; stroke-linecap: round; }
.overview-panel { position: relative; z-index: 1; display: grid; grid-template-rows: 1fr auto; gap: 12px; }
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric { display: flex; min-height: 112px; flex-direction: column; justify-content: center; padding: 19px; border-radius: 10px; background: var(--ink); }
.metric:first-child { background: var(--lime); }
.metric span { color: white; font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.05em; }
.metric:first-child span, .metric:first-child small { color: var(--ink); }
.metric small { margin-top: 10px; color: rgba(255,255,255,0.68); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.filename-rule { padding: 17px 18px; border: 1px solid var(--line); border-radius: 10px; background: #f8f6ef; }
.filename-rule > div { display: flex; justify-content: space-between; gap: 12px; }
.filename-rule span { color: var(--coral); font: 500 9px/1 "DM Mono", monospace; letter-spacing: 0.12em; }
.filename-rule small { color: var(--muted); font-size: 9px; }
.filename-rule code { display: block; margin-top: 11px; color: var(--ink-soft); font: 400 12px/1.2 "DM Mono", monospace; }
.filename-rule code b { color: var(--ink); font-weight: 500; }
.filename-rule code i { padding: 0 5px; color: var(--coral); font-style: normal; }

.library { margin-top: 28px; }
.library-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 14px 2px 20px; }
.section-kicker, .word-label { margin: 0; color: var(--coral); font: 500 9px/1 "DM Mono", monospace; letter-spacing: 0.15em; }
.title-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
h2 { margin: 0; font-size: clamp(27px, 3vw, 38px); line-height: 1; letter-spacing: -0.05em; }
.count { display: grid; place-items: center; min-width: 30px; height: 25px; padding: 0 8px; border-radius: 99px; background: var(--lime); font: 600 10px/1 "DM Mono", monospace; }
.result-summary { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.tools { display: flex; align-items: center; gap: 8px; }
.search-wrap, .sort-wrap { position: relative; display: flex; align-items: center; }
.search-wrap > svg { position: absolute; left: 13px; width: 16px; fill: none; stroke: var(--muted); stroke-width: 1.8; pointer-events: none; }
.search-wrap input { width: 210px; height: 42px; padding: 0 13px 0 38px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; outline: none; background: var(--surface); font-size: 12px; }
.search-wrap input:focus, .sort-wrap select:focus { border-color: var(--ink-soft); box-shadow: 0 0 0 3px rgba(23, 62, 53, 0.08); }
.sort-wrap select { height: 42px; padding: 0 36px 0 13px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 8px; outline: none; appearance: none; background: var(--surface); font-size: 11px; font-weight: 700; }
.sort-wrap svg { position: absolute; right: 11px; width: 15px; fill: none; stroke: var(--muted); stroke-width: 1.8; pointer-events: none; }
.view-switcher { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.view-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #83908a; border: 0; border-radius: 5px; background: transparent; }
.view-button.is-active { color: white; background: var(--ink); }
.view-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.refresh-button { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 15px; color: white; border: 0; border-radius: 8px; background: var(--ink); font-size: 11px; font-weight: 800; transition: transform 160ms ease, background 160ms ease; }
.refresh-button:hover { transform: translateY(-1px); background: var(--ink-soft); }
.refresh-button:disabled { cursor: wait; opacity: 0.7; transform: none; }
.refresh-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.refresh-button.is-loading svg { animation: spin 800ms linear infinite; }
.sync-strip { display: flex; justify-content: space-between; align-items: center; min-height: 39px; margin-bottom: 15px; padding: 0 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 254, 250, 0.65); font: 500 9px/1 "DM Mono", monospace; }
.sync-strip > span { display: flex; align-items: center; gap: 9px; }
.sync-strip .is-syncing i { background: var(--coral); animation: pulse 900ms ease-in-out infinite alternate; }
.sync-strip .has-error i { background: #c64f4f; }

.loading-grid, .asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.loading-grid[hidden] { display: none; }
.asset-grid { transition: opacity 160ms ease; }
.asset-grid.is-loading { opacity: 0.42; pointer-events: none; }
.skeleton-card { overflow: hidden; height: 390px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.skeleton-card div, .skeleton-card span, .skeleton-card i { display: block; background: linear-gradient(100deg, #e9e6de 20%, #f5f3ed 38%, #e9e6de 56%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton-card div { height: 235px; }
.skeleton-card span { width: 45%; height: 24px; margin: 26px 22px 0; border-radius: 5px; }
.skeleton-card i { width: calc(100% - 44px); height: 42px; margin: 30px 22px 0; border-radius: 7px; }

.asset-card { min-width: 0; overflow: hidden; border: 1px solid rgba(23, 62, 53, 0.13); border-radius: 12px; background: var(--surface); box-shadow: 0 6px 20px rgba(28, 52, 44, 0.05); transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.asset-card:hover { transform: translateY(-3px); border-color: rgba(23, 62, 53, 0.25); box-shadow: var(--shadow); }
.preview-wrap { position: relative; padding: 14px; background: #dedbd2; }
.sprite-preview { display: grid; grid-template-columns: repeat(3, 1fr); aspect-ratio: 4 / 3; overflow: hidden; border: 4px solid white; border-radius: 5px; background-color: #fff; background-image: linear-gradient(45deg, #e3e1db 25%, transparent 25%), linear-gradient(-45deg, #e3e1db 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e3e1db 75%), linear-gradient(-45deg, transparent 75%, #e3e1db 75%); background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; box-shadow: 0 7px 20px rgba(27, 43, 37, 0.12); }
.sprite-frame { min-width: 0; min-height: 0; overflow: hidden; border: 0.5px solid rgba(23, 62, 53, 0.08); background: inherit; }
.sprite-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ready-badge, .frame-badge { position: absolute; top: 24px; padding: 6px 8px; border-radius: 99px; box-shadow: 0 3px 12px rgba(30, 49, 42, 0.12); font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.ready-badge { left: 24px; display: flex; align-items: center; gap: 6px; color: var(--ink); background: rgba(255,255,255,0.93); }
.ready-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.frame-badge { right: 24px; color: white; background: rgba(23, 62, 53, 0.88); }
.card-content { padding: 19px; }
.card-meta { display: flex; justify-content: space-between; align-items: end; gap: 15px; }
.word-label { margin-bottom: 7px; }
.word { margin: 0; overflow: hidden; color: var(--ink); font-size: 25px; line-height: 1; letter-spacing: -0.045em; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.date { flex: 0 0 auto; padding-bottom: 2px; color: var(--muted); font: 400 9px/1 "DM Mono", monospace; }
.file-detail { display: flex; align-items: center; gap: 7px; margin: 18px 0 13px; color: var(--muted); font: 400 9px/1 "DM Mono", monospace; }
.file-detail svg { width: 14px; fill: none; stroke: var(--coral); stroke-width: 1.6; stroke-linejoin: round; }
.download-button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; width: 100%; min-height: 42px; padding: 0 13px; color: white; border: 0; border-radius: 8px; background: var(--coral); text-align: left; transition: transform 160ms ease, background 160ms ease; }
.download-button:hover { transform: translateY(-1px); background: var(--coral-dark); }
.download-button:disabled { cursor: wait; transform: none; }
.download-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.download-button span { font-size: 11px; font-weight: 800; }
.download-button small { color: rgba(255,255,255,0.75); font: 500 8px/1 "DM Mono", monospace; text-transform: uppercase; }
.download-button.is-downloading .download-icon { animation: bounce 700ms ease-in-out infinite alternate; }
.download-button.is-complete { background: var(--green); }

.asset-grid.list-view { grid-template-columns: 1fr; }
.list-view .asset-card { display: grid; grid-template-columns: 255px 1fr; }
.list-view .preview-wrap { padding: 10px; }
.list-view .card-content { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(170px, .8fr) 190px; align-items: center; gap: 24px; padding: 18px 22px; }
.list-view .card-meta { align-items: center; }
.list-view .file-detail, .list-view .download-button { margin: 0; }
.list-view .ready-badge, .list-view .frame-badge { top: 18px; }
.list-view .ready-badge { left: 18px; }
.list-view .frame-badge { right: 18px; }

.empty-state { grid-column: 1 / -1; display: flex; min-height: 270px; flex-direction: column; align-items: center; justify-content: center; padding: 40px; border: 1px dashed #bbb7ad; border-radius: 12px; color: var(--muted); background: rgba(255, 254, 250, 0.55); text-align: center; }
.empty-state span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 50%; color: var(--coral); background: rgba(237, 117, 92, 0.1); font: 500 13px/1 "DM Mono", monospace; }
.empty-state strong { color: var(--ink); font-size: 18px; }
.empty-state p { margin: 7px 0 0; font-size: 12px; }

.pagination { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px; margin-top: 26px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pagination[hidden] { display: none; }
.page-arrow { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 11px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 7px; background: #f8f6ef; font-size: 10px; font-weight: 800; }
.page-arrow:hover:not(:disabled) { color: white; border-color: var(--ink); background: var(--ink); }
.page-arrow:disabled { cursor: not-allowed; opacity: 0.4; }
.page-arrow svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.page-numbers { display: flex; justify-content: center; align-items: center; gap: 5px; }
.page-number { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: var(--muted); border: 0; border-radius: 7px; background: transparent; font: 500 10px/1 "DM Mono", monospace; }
.page-number:hover { color: var(--ink); background: var(--surface-soft); }
.page-number.is-active { color: white; background: var(--ink); }
.page-ellipsis { color: var(--muted); font: 500 10px/1 "DM Mono", monospace; }
.page-summary { color: var(--muted); font: 500 9px/1 "DM Mono", monospace; white-space: nowrap; }

footer { display: flex; justify-content: space-between; padding: 22px max(24px, calc((100% - 1320px) / 2)); color: rgba(255,255,255,0.6); background: var(--ink); font: 400 9px/1.4 "DM Mono", monospace; letter-spacing: 0.07em; text-transform: uppercase; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: min(360px, calc(100vw - 48px)); padding: 13px 16px; color: white; border-radius: 9px; background: var(--ink); box-shadow: 0 14px 36px rgba(19, 42, 35, 0.24); font-size: 11px; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity 180ms ease, transform 180ms ease; }
.toast[data-type="error"] { background: #9d4941; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { to { opacity: .35; } }
@keyframes shimmer { to { background-position-x: -200%; } }
@keyframes bounce { to { transform: translateY(3px); } }

@media (max-width: 1050px) {
  .login-view { grid-template-columns: minmax(340px, 1fr) minmax(400px, 1fr); }
  .login-card { width: min(100% - 56px, 520px); }
  .login-art { padding: 48px 36px; }
  .workspace-preview { padding: 22px; }
  .overview { grid-template-columns: 1fr 340px; gap: 30px; }
  .loading-grid, .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-header { align-items: stretch; flex-direction: column; }
  .tools { flex-wrap: wrap; }
  .search-wrap { flex: 1; }
  .search-wrap input { width: 100%; }
}

@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; }
  .login-card { width: min(100% - 40px, 560px); padding: 40px 0; }
  .login-brand { margin-bottom: 56px; }
  .login-security { margin-top: 46px; }
  .login-art { display: none; }
  .topbar-inner, .dashboard { width: min(100% - 28px, 1320px); }
  .workflow-pill { display: none; }
  .overview { grid-template-columns: 1fr; padding: 28px; }
  .overview-panel { grid-template-columns: 1fr; }
  .metric { min-height: 94px; }
  .loading-grid, .asset-grid { grid-template-columns: 1fr; }
  .view-switcher { display: none; }
  .asset-grid.list-view { grid-template-columns: 1fr; }
  .list-view .asset-card { display: block; }
  .list-view .card-content { display: block; }
  .list-view .file-detail { margin: 18px 0 13px; }
  .sort-wrap select { max-width: 142px; }
  .pagination { grid-template-columns: auto 1fr auto; gap: 8px; }
  .page-summary { display: none; }
  .page-arrow span { display: none; }
  .page-arrow { justify-content: center; width: 36px; padding: 0; }
}

@media (max-width: 600px) {
  .connection span { display: none; }
  .account-menu span { display: none; }
}

@media (max-width: 480px) {
  .login-card h1 { font-size: 38px; }
  .login-copy { margin: 20px 0 27px; font-size: 14px; }
  .google-sign-in { width: 100%; }
  .overview { padding: 24px 20px; }
  h1 { font-size: 39px; }
  .metric-row { gap: 8px; }
  .metric { padding: 14px; }
  .metric span { font-size: 28px; }
  .filename-rule > div small { display: none; }
  .library-header { padding-top: 6px; }
  .tools { display: grid; grid-template-columns: 1fr auto; }
  .search-wrap { grid-column: 1 / -1; }
  .sort-wrap select { width: 100%; max-width: none; }
  .sync-strip { align-items: flex-start; flex-direction: column; gap: 7px; padding: 10px 12px; }
  footer { gap: 9px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
