@charset "UTF-8";
/* Neutral workspace typography, controls and shared list rows. */
:root {
  font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB",sans-serif;
  color: var(--text); background: var(--bg); color-scheme: light; font-synthesis: none;
  --bg: #f7f7f7; --paper: #fff; --surface: #fafafa; --surface-soft: #f8f8f8;
  --surface-hover: #f0f0f0; --row-hover: #fcfcfc; --sidebar-bg: #f2f2f2;
  --text: #262626; --content: #333; --field-text: #303030; --muted: #666;
  --line: #e6e6e6; --soft-line: #eee; --field-line: #dedede;
  --accent: #262626; --accent-soft: #ededed; --on-accent: #fff; --primary-hover: #111;
  --focus-border: #777; --placeholder: #767676; --focus-ring: #2626260b; --drag-ring: #26262614;
  --nav-surface: #fdfdfdef; --backdrop: #2c2c2c45; --drawer-backdrop: #2b2b2b24; --menu-backdrop: #2b2b2b30;
  --danger: #bb4753; --danger-hover: #9a3541; --on-danger: #fff;
  --error-text: #a93d48; --error-bg: #fff2f3; --error-line: #f4dce0;
  --warning-bg: #fff7ef; --warning-line: #f3e4d1;
  --status-active: #507863; --status-revoked: #a05b65; --status-dot: #75a28c;
  --sidebar: 184px; --radius: 8px; --main-gutter: 28px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414; --paper: #1c1c1c; --surface: #232323; --surface-soft: #242424;
  --surface-hover: #2b2b2b; --row-hover: #242424; --sidebar-bg: #181818;
  --text: #e7e7e7; --content: #dedede; --field-text: #e5e5e5; --muted: #b2b2b2;
  --line: #3a3a3a; --soft-line: #333; --field-line: #696969;
  --accent: #e5e5e5; --accent-soft: #333; --on-accent: #161616; --primary-hover: #fff;
  --focus-border: #a8a8a8; --placeholder: #aaa; --focus-ring: #e5e5e518; --drag-ring: #e5e5e524;
  --nav-surface: #181818ef; --backdrop: #00000099; --drawer-backdrop: #00000077; --menu-backdrop: #00000088;
  --danger: #ff96a0; --danger-hover: #ffb4be; --on-danger: #231416;
  --error-text: #ffb4be; --error-bg: #341e23; --error-line: #66353d;
  --warning-bg: #33291c; --warning-line: #655139;
  --status-active: #99c5aa; --status-revoked: #dfa0aa; --status-dot: #99c5aa;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.6; }
button,input,select,textarea { font: inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color: transparent; }
button,.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; text-decoration: none; cursor: pointer; font-weight: 500; line-height: 1.4; white-space: nowrap; }
button:hover,.button:hover { background: var(--soft-line); }
button:disabled,.button:has(input:disabled) { opacity: .45; cursor: not-allowed; }
button.primary,.button.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 1px 2px #0000000a; }
button.primary:hover,.button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
button.ghost,.button.ghost { border-color: var(--line); background: var(--paper); }
button.ghost:hover,.button.ghost:hover { background: var(--surface-hover); }
.danger { color: var(--danger); }
.icon-button { width: 38px; min-height: 38px; padding: 10px; color: var(--muted); border-color: transparent; flex: none; }
.icon-button:hover { color: var(--content); background: var(--surface-hover); }
.icon-button.danger:hover { color: var(--danger); background: var(--error-bg); }
.icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: 20px; letter-spacing: -.3px; line-height: 1.4; font-weight: 650; }
h2 { font-size: 16px; font-weight: 620; }
h3 { font-size: 14px; font-weight: 560; }
.muted,.form-hint { color: var(--muted); }
.optional { font-size: 12px; color: var(--muted); font-weight: 400; }
.eyebrow { font-size: 12px; letter-spacing: 1.5px; color: var(--muted); font-weight: 500; }
.full { width: 100%; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
.sidebar { background: var(--sidebar-bg); border-right: 1px solid var(--line); padding: 23px 13px 12px; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar); z-index: 20; }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px; color: var(--text); text-decoration: none; font-size: 17px; font-weight: 650; letter-spacing: -.6px; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 28px; height: 28px; color: var(--accent); }
.main-nav button { justify-content: flex-start; height: 40px; padding: 8px 12px; gap: 11px; text-align: left; color: var(--muted); font-size: 14px; }
.main-nav button .icon { width: 18px; height: 18px; }
.main-nav button:hover { background: var(--surface-hover); }
.main-nav button.selected { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-bottom { margin-top: auto; }
.storage-label { font-size: 12px; display: flex; justify-content: space-between; gap: 4px; color: var(--muted); margin-top: 24px; }
#quota { font-variant-numeric: tabular-nums; font-size: 12px; }
.sidebar progress { display: block; width: 100%; height: 3px; margin: 8px 0; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: var(--line); }
.sidebar progress::-webkit-progress-bar { background: var(--line); }
.sidebar progress::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
.sidebar progress::-moz-progress-bar { background: var(--accent); }
#quota-note { font-size: 12px; color: var(--muted); }
.account-strip { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; min-width: 0; }
.avatar { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper); border-radius: 7px; font-size: 12px; color: var(--muted); font-weight: 600; }
.account-strip #account-label { font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-strip .icon-button { width: 38px; min-height: 38px; padding: 10px; }
.main-shell { grid-column: 2; min-width: 0; }
.topbar { height: 40px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--main-gutter); background: var(--surface); gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.theme-toggle { width: 38px; min-height: 38px; padding: 9px; border-radius: 6px; }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle:focus-visible { outline-offset: -3px; }
.breadcrumbs { display: flex; align-items: center; gap: 14px; font-size: 12px; }
.workspace-word,.divider { color: var(--muted); }
.privacy-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--status-dot); }
.main-shell main { padding: 20px var(--main-gutter); min-height: calc(100dvh - 88px); }
.main-shell footer { min-height: 48px; padding: 10px var(--main-gutter); display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.main-shell footer span:nth-child(2) { flex: 1; }
footer a { color: var(--muted); }
#notice { position: fixed; left: calc(var(--sidebar) + var(--main-gutter)); right: auto; bottom: 24px; z-index: 60; max-width: min(520px,calc(100vw - var(--sidebar) - 56px)); margin: 0; padding: 10px 14px; border: 1px solid var(--field-line); background: var(--paper); color: var(--content); font-size: 13px; line-height: 1.6; border-radius: var(--radius); box-shadow: 0 6px 24px #00000014; overflow-wrap: anywhere; pointer-events: none; }
#notice.error { color: var(--error-text); background: var(--error-bg); border-color: var(--error-line); }
.auth-card { max-width: 360px; width: 100%; margin: clamp(28px,10vh,120px) auto 36px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 6px 24px #28282803; }
.auth-card h1 { font-size: 24px; margin: 8px 0; }
.auth-card>.muted { font-size: 14px; margin-bottom: 24px; line-height: 1.8; }
.auth-symbol { width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 10px; display: grid; place-items: center; color: var(--accent); margin-bottom: 22px; }
.auth-symbol .icon { width: 26px; height: 26px; }
.auth-card .form-hint { margin-top: 15px; font-size: 12px; text-align: center; }
label { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
input:not([type=file]):not([type=checkbox]),select,textarea { color: var(--field-text); border: 1px solid var(--field-line); background: var(--paper); border-radius: 6px; padding: 8px 10px; max-width: 100%; width: 100%; min-height: 38px; box-shadow: 0 1px 1px #11111102; font-size: 14px; }
input::placeholder,textarea::placeholder { color: var(--placeholder); font-weight: 400; }
input:focus,textarea:focus,select:focus { border-color: var(--focus-border); box-shadow: 0 0 0 3px var(--focus-ring); }
textarea { resize: vertical; line-height: 1.75; font-family: ui-monospace,SFMono-Regular,Consolas,"PingFang SC",monospace; font-size: 14px; }
form>label { margin-bottom: 15px; }
label>input:not([type=checkbox]),label>textarea { display: block; margin-top: 6px; }
form .form-error { font-size: 12px; color: var(--error-text); line-height: 1.7; margin: 10px 0; overflow-wrap: anywhere; }
.form-hint { font-size: 12px; line-height: 1.8; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-width: 0; }
.section-heading h1 { display: flex; align-items: center; gap: 9px; }
.section-heading p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.count { font-size: 12px; background: var(--soft-line); color: var(--muted); padding: 2px 6px; border-radius: 5px; min-width: 20px; letter-spacing: 0; font-weight: 500; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-width: 0; }
.search-field { display: flex; align-items: center; gap: 7px; background: var(--paper); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 6px; width: 240px; height: 38px; min-height: 38px; padding: 0 9px; min-width: 0; }
.search-field .icon { width: 15px; height: 15px; color: var(--muted); }
.toolbar .search-field input[type=search] { border: 0; box-shadow: none; padding: 0; margin: 0; background: transparent; min-width: 0; height: 38px; min-height: 38px; line-height: 20px; }
.search-field:focus-within { box-shadow: inset 0 0 0 1px var(--focus-border); }
.default-note { font-size: 12px; color: var(--muted); margin-left: auto; }
.toolbar>select { width: auto; font-size: 14px; height: 38px; min-height: 38px; line-height: 20px; padding: 6px 8px; }
.file-table,.credential-list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.file-table.dragover { border-color: var(--accent); background: var(--surface-hover); box-shadow: 0 0 0 3px var(--drag-ring); }
.table-heading { height: 36px; background: var(--surface); color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.table-heading span:last-child { text-align: right; }
.file-row { min-height: 56px; border-bottom: 1px solid var(--soft-line); padding-block: 8px; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--row-hover); }
.file-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.file-type-icon { width: 28px; height: 30px; border: 1px solid var(--soft-line); border-radius: 6px; display: grid; place-items: center; color: var(--muted); background: var(--surface); flex: none; }
.file-type-icon .icon { width: 15px; height: 15px; }
.file-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; min-width: 0; }
.file-name-wrap { min-width: 0; }
.file-meta,.file-size,.file-expiry { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.file-meta { margin-top: 3px; }
.file-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.file-actions .icon-button { width: 38px; min-height: 38px; padding: 10px; }
.mobile-meta { display: none; }
.empty { padding: 55px 20px; text-align: center; color: var(--muted); line-height: 1.8; }
.empty .icon { display: block; width: 32px; height: 32px; margin: 0 auto 12px; color: var(--muted); }
.empty strong { display: block; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 5px; }
.empty p { font-size: 12px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; font-size: 12px; color: var(--muted); min-width: 0; }
.pagination>div { display: flex; gap: 6px; }
.pagination button { font-size: 12px; min-height: 38px; padding: 6px 10px; }
.upload-list:empty { display: none; }
.upload-list { margin-bottom: 12px; }
.progress-card { display: grid; grid-template-columns: minmax(100px,1fr) minmax(70px,140px) auto; gap: 10px; align-items: center; background: var(--paper); border: 1px solid var(--line); padding: 10px 12px; border-radius: 7px; margin-bottom: 6px; font-size: 14px; }
.progress-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-card .progress-status { grid-column: 1/3; color: var(--muted); font-size: 12px; }
.progress-card progress { width: 100%; height: 4px; accent-color: var(--accent); }
.progress-card .icon-button { grid-column: 3; grid-row: 1/3; }
.paste-composer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; transition: border-color .15s; }
.paste-composer:focus-within { border-color: var(--focus-border); box-shadow: 0 0 0 3px var(--focus-ring); }
.paste-zone { padding: 8px 12px; min-height: 44px; display: flex; align-items: center; gap: 8px; outline: none; cursor: text; color: var(--muted); font-size: 14px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.paste-zone .icon { color: var(--muted); width: 20px; height: 20px; }
.paste-zone:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.paste-zone.dragover { background: var(--surface-hover); }
.paste-actions { border-top: 1px solid var(--soft-line); padding: 1px 8px; min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); background: var(--surface); }
.paste-actions .button,.paste-actions button { min-height: 36px; padding: 5px 8px; font-size: 12px; border: 0; background: transparent; }
.paste-actions .icon { width: 13px; height: 13px; }
.retry-strip { display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--warning-bg); border: 1px solid var(--warning-line); border-radius: 7px; margin-bottom: 12px; font-size: 12px; }
.retry-strip span { flex: 1; overflow-wrap: anywhere; }
.retry-strip button { font-size: 12px; min-height: 38px; }
.clip-card-bottom .file-actions { gap: 1px; }
.clip-card-bottom .icon-button { width: 38px; min-height: 38px; padding: 10px; }
.credential-row { border-bottom: 1px solid var(--line); }
.credential-row:last-child { border-bottom: 0; }
.credential-header { width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 48px; padding: 8px 14px; border: 0; border-radius: 0; font-weight: 400; text-align: left; }
.credential-header:hover { background: var(--surface); }
.credential-header .credential-name { font-size: 14px; font-weight: 500; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.credential-header .credential-date { font-size: 12px; color: var(--muted); }
.credential-header .chevron { width: 13px; height: 13px; color: var(--muted); transition: transform .15s; }
.credential-header[aria-expanded=true] .chevron { transform: rotate(90deg); }
.credential-detail { background: var(--surface); border-top: 1px solid var(--soft-line); padding: 14px; }
.credential-reader .credential-detail { background: transparent; border: 0; padding: 0; }
.secret-row { display: grid; grid-template-columns: 88px minmax(0,1fr) auto; align-items: start; gap: 10px; margin-bottom: 8px; }
.secret-label { font-size: 12px; padding-top: 9px; color: var(--muted); }
.secret-value { font: 14px/1.7 ui-monospace,SFMono-Regular,Consolas,"PingFang SC",monospace; min-height: 33px; white-space: pre-wrap; overflow-wrap: anywhere; padding: 6px 10px; border: 1px solid var(--soft-line); border-radius: 5px; background: var(--paper); color: var(--content); }
.secret-value.masked { letter-spacing: 2px; color: var(--muted); user-select: none; }
.secret-actions { display: flex; gap: 2px; }
.credential-detail-footer { display: flex; justify-content: flex-end; gap: 5px; margin-top: 12px; }
.credential-detail-footer button { font-size: 12px; min-height: 38px; padding: 6px 10px; }
.credential-detail-footer .icon { width: 13px; height: 13px; }
.bin-section { border: 1px solid var(--line); background: var(--paper); border-radius: 9px; margin-top: 16px; padding: 14px; }
.bin-section h2 { font-size: 13px; margin-bottom: 12px; }
.bin-row { display: flex; gap: 10px; align-items: center; min-height: 42px; border-top: 1px solid var(--surface-hover); }
.bin-row .file-name { flex: 1; }
.bin-row button { font-size: 12px; min-height: 38px; }
.settings-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 16px; }
.settings-title { margin-bottom: 12px; }
.settings-title h2 { font-size: 16px; }
.settings-title p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--soft-line); }
.setting-row:first-child { border-top: 1px solid var(--surface-hover); }
.retention-control { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; max-width: 100%; flex-wrap: wrap; }
.retention-control select { min-width: 126px; width: auto; font-size: 14px; height: 38px; min-height: 38px; padding: 5px 9px; }
.retention-control input[type=number] { width: 70px; font-size: 14px; height: 38px; min-height: 38px; padding: 5px 8px; }
.custom-unit { font-size: 12px; color: var(--muted); }
.form-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; }
.form-footer .muted { font-size: 12px; margin-right: auto; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.api-info code { display: block; padding: 9px 12px; border: 1px solid var(--accent-soft); background: var(--surface-soft); border-radius: 6px; font: 12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; overflow-wrap: anywhere; }
.api-info p { font-size: 14px; color: var(--muted); margin-top: 10px; }
.doc-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; margin-top: 16px; }
dialog { width: 390px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); padding: 22px; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 100px #2a2a2a20; overflow: auto; background: var(--paper); color: var(--text); }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
.wide-dialog { width: 580px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.dialog-heading h2 { font-size: 18px; overflow-wrap: anywhere; }
.dialog-heading p { font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.dialog-heading>.icon-button { margin: -5px -6px 0 0; }
dialog>.muted { font-size: 12px; margin-bottom: 15px; }
dialog .form-hint { margin: 12px 0; }
.share-created { padding: 12px; background: var(--surface-soft); border: 1px solid var(--surface-hover); border-radius: 7px; margin-top: 15px; }
.share-created .ghost { margin-top: 8px; font-size: 12px; min-height: 38px; }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--soft-line); padding-top: 10px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.share-row button { font-size: 12px; min-height: 38px; padding: 6px 10px; }
.replace-label { display: flex; align-items: center; gap: 6px; margin: 8px 0; color: var(--muted); font-size: 12px; }
.replace-label input { margin: 0; accent-color: var(--accent); }
.credential-entry>label:not(.replace-label) { margin-bottom: 14px; }
.noscript { position: fixed; bottom: 0; padding: 15px; background: var(--error-bg); color: var(--error-text); z-index: 100; width: 100%; text-align: center; }
.main-nav .mobile-more { display: none; }
.nav-separator { height: 1px; background: var(--line); margin: 11px 10px; }
.main-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.file-title-button { display: block; min-height: 36px; padding: 0; border: 0; border-radius: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 14px; background: transparent; }
.file-title-button:hover { background: transparent; color: var(--accent); }
.table-heading,.file-row { display: grid; grid-template-columns: minmax(120px,1fr) 64px 148px 140px 80px; gap: 12px; align-items: center; padding: 0 16px; }
.file-created { font-size: 12px; color: var(--muted); white-space: nowrap; }
.clip-list { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.clip-card { background: var(--paper); border: 0; border-radius: 0; padding: 8px 12px; min-width: 0; display: grid; gap: 12px; grid-template-columns: 38px minmax(0,1fr); border-bottom: 1px solid var(--line); align-items: center; min-height: 72px; }
.clip-card:last-child { border-bottom: 0; }
.clip-card h3 { font-size: 14px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0 0 2px; min-width: 0; }
.clip-card pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; background: transparent; padding: 0; color: var(--content); overflow: hidden; font-size: 14px; line-height: 20px; }
.clip-card img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 5px; background: var(--bg); }
.clip-file-placeholder { display: flex; align-items: center; justify-content: flex-start; gap: 7px; min-height: 0; padding: 0; background: transparent; border-radius: 5px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.clip-card .file-meta { font-size: 12px; margin: 0; }
.clip-card-bottom { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; min-width: 0; margin: 0; padding: 0; border: 0; }
.clip-card-bottom .text-button { font-size: 12px; color: var(--muted); border: 0; min-height: 38px; padding: 6px 8px; }
.clip-list>.empty { grid-column: 1/-1; background: var(--paper); border: 0; border-radius: 9px; }
.record-list,.timeline-list { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.record-row { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--soft-line); min-height: 64px; }
.record-row:last-child { border: 0; }
.record-row:hover { background: var(--row-hover); }
.record-main { display: flex; flex-direction: column; align-items: flex-start; text-align: left; flex: 1; min-width: 0; padding: 0; background: transparent; font-weight: 400; border-radius: 0; white-space: normal; gap: 3px; }
.record-main:hover { background: transparent; }
.record-title { font-size: 14px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; color: var(--content); line-height: 1.5; }
.record-preview { font-size: 14px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; line-height: 1.65; }
.record-time { font-size: 12px; color: var(--muted); }
.todo-checkbox { appearance: none; width: 18px; height: 18px; border: 1px solid var(--field-line); border-radius: 5px; background: var(--paper); cursor: pointer; flex: none; margin: 0; position: relative; }
.todo-checkbox:checked { background: var(--accent); border-color: var(--accent); }
.todo-checkbox:checked:after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--on-accent); border-width: 0 1.7px 1.7px 0; transform: rotate(45deg); }
.todo-checkbox:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.todo-checkbox:disabled { opacity: .4; cursor: wait; }
.completed .record-title { text-decoration: line-through; color: var(--muted); }
.completed .record-preview { color: var(--muted); }
.list-status { font-size: 12px; color: var(--muted); margin-left: auto; }
.checkbox-label { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.checkbox-label input { accent-color: var(--accent); }
.timeline-advanced { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--soft-line); margin-bottom: 8px; }
.timeline-advanced>label { font-size: 12px; color: var(--muted); flex: 1; min-width: 140px; max-width: 230px; }
.timeline-advanced select,.timeline-advanced input { display: block; margin-top: 5px; font-size: 14px; min-height: 36px; }
.timeline-advanced button { min-height: 36px; font-size: 14px; }
.timeline-caption { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin: 8px 0 12px; }
.timeline-record { display: grid; grid-template-columns: 76px 160px minmax(0,1fr) 38px; align-items: start; gap: 12px; padding: 14px; border-bottom: 1px solid var(--soft-line); }
.timeline-record:last-child { border: 0; }
.timeline-time { font: 12px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: 0; color: var(--muted); padding-top: 2px; white-space: nowrap; }
.timeline-subject { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.timeline-harness { font-size: 14px; color: var(--content); font-weight: 550; }
.timeline-device { color: var(--muted); }
.timeline-environment { color: var(--muted); font-size: 12px; }
.timeline-description { font-size: 14px; color: var(--content); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; margin: 0; }
.credential-empty { font-size: 12px; color: var(--muted); line-height: 1.8; padding: 8px 0; }
.detail-meta { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 12px; font-size: 12px; margin: 24px 0; }
.detail-meta dt { color: var(--muted); }
.detail-meta dd { margin: 0; overflow-wrap: anywhere; color: var(--content); }
.detail-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.detail-actions>.icon-button { width: auto; border: 1px solid var(--line); padding: 8px 12px; }
.detail-actions>a.icon-button:after { content: "下载"; margin-left: 5px; font-size: 14px; }
#file-drawer-preview img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 6px; background: var(--surface-soft); }
dialog.drawer { position: fixed; top: 0; right: 0; bottom: 0; left: auto; margin: 0; width: 520px; max-width: calc(100vw - 30px); height: 100dvh; max-height: 100dvh; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 24px; box-shadow: -12px 0 55px #2e2e2e12; }
dialog.drawer::backdrop { background: var(--drawer-backdrop); backdrop-filter: none; }
dialog.drawer .dialog-heading { position: sticky; top: -24px; margin-inline: -24px; padding: 20px 24px; background: var(--paper); z-index: 2; border-bottom: 1px solid var(--surface-hover); }
dialog.drawer .form-footer { position: sticky; bottom: -24px; background: var(--paper); margin-inline: -24px; padding: 16px 24px; border-top: 1px solid var(--soft-line); z-index: 2; }
dialog.drawer textarea { max-height: calc(100dvh - 280px); min-height: 120px; }
.more-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.more-nav button { display: flex; justify-content: flex-start; min-height: 48px; padding: 12px; background: var(--surface-soft); white-space: normal; }
.more-nav .icon { color: var(--muted); }
.more-menu { width: 350px; }
.authorization-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 38px; }
.authorization-heading h2 { font-size: 16px; margin: 0; }
.authorization-heading>span { font-size: 12px; color: var(--muted); margin-left: auto; }
.authorization-heading>.ghost { display: flex; align-items: center; gap: 5px; min-height: 38px; padding: 6px 10px; font-size: 12px; }
.authorization-heading .icon { width: 13px; height: 13px; transition: transform .15s; }
.authorization-heading [aria-expanded=true] .icon { transform: rotate(90deg); }
.authorization-list-heading { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; margin-bottom: 8px; }
.authorization-list-heading h3 { font-size: 12px; font-weight: 500; }
.authorization-list-heading .list-status { margin-left: auto; }
.authorization-list-heading>.icon-button { width: 38px; min-height: 38px; }
.grant-list { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.grant-row { display: grid; grid-template-columns: minmax(0,1fr) auto 48px; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.grant-row:last-child { border-bottom: 0; }
.grant-main { display: flex; flex-direction: column; gap: 3px; border: 0; background: transparent; padding: 0; text-align: left; min-width: 0; font-weight: 400; }
.grant-main:hover { background: transparent; }
.grant-main .record-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grant-summary { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.grant-timing { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.grant-status { font-size: 12px; color: var(--muted); }
.grant-status.active { color: var(--status-active); }
.grant-status.revoked { color: var(--status-revoked); }
.grant-row>.ghost { font-size: 12px; min-height: 38px; padding: 6px 8px; }
.authorization-settings .pagination { padding-bottom: 0; }
.metadata-list { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 10px 14px; margin: 20px 0; font-size: 12px; line-height: 1.65; }
.metadata-list dt { color: var(--muted); }
.metadata-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.authorization-name { font-size: 17px; line-height: 1.7; margin-bottom: 14px; overflow-wrap: anywhere; }
.authorization-code-box { padding: 15px 18px; border: 1px solid var(--soft-line); border-radius: 8px; background: var(--surface-soft); }
.authorization-code-box span { display: block; color: var(--muted); font-size: 12px; }
.authorization-code-box strong { display: block; margin-top: 8px; font: 600 25px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: 3px; }
.authorization-scope { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; }
.authorization-scope h3 { font-size: 14px; margin-bottom: 8px; }
.authorization-scope p { font-size: 14px; line-height: 1.8; color: var(--muted); margin-bottom: 10px; }
.authorization-scope strong { color: var(--content); }
.authorization-login-hint { background: var(--bg); border: 1px solid var(--accent-soft); border-radius: 6px; padding: 10px 12px; margin-bottom: 18px; font-size: 12px; line-height: 1.8; color: var(--muted); }
#authorization-dialog>#refresh-authorization { font-size: 12px; margin-top: 15px; }
#authorization-dialog .form-footer { justify-content: space-between; }
.drawer-body { display: contents; }
form>.drawer-body>label { margin-bottom: 15px; }
.drawer-body>#retention-name { font-size: 12px; margin-bottom: 15px; }
.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; }
.quick-add-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-bottom: 12px; align-items: stretch; }
.quick-add-form>label { margin: 0; min-width: 0; }
.quick-add-form input:not([type=checkbox]) { margin: 0; height: 38px; min-height: 38px; line-height: 20px; font-size: 14px; }
.quick-add-form>.primary { min-width: 76px; height: 38px; min-height: 38px; }
.quick-add-form>.form-error { grid-column: 1/-1; margin: 0; }
.timeline-day+.timeline-day { border-top: 1px solid var(--line); }
.timeline-date { font-size: 12px; color: var(--muted); padding: 12px 15px; background: var(--surface); font-weight: 600; }
.timeline-read { display: block; padding: 0; text-align: left; min-width: 0; white-space: normal; font-weight: 400; line-height: 1.7; }
.timeline-read:hover { background: transparent; }
.filter-toggle { display: inline-flex; }
.filter-chips { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; }
.filter-chips>div { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.filter-chip { max-width: 100%; display: flex; gap: 7px; padding: 6px 9px; min-height: 38px; font-size: 12px; border: 1px solid var(--field-line); background: var(--paper); font-weight: 400; white-space: normal; }
.filter-chip span { overflow-wrap: anywhere; min-width: 0; text-align: left; }
.filter-chip .icon { width: 12px; height: 12px; color: var(--muted); }
.filter-chips>.text-button { font-size: 12px; min-height: 38px; flex: none; }
#todo-notes-toggle { margin: 4px 0 16px; font-size: 12px; }
dialog.reading-drawer[open] { display: flex; flex-direction: column; overflow: hidden; padding: 0 24px; }
.reading-drawer>.dialog-heading { position: static; flex: none; margin-bottom: 0; }
.reading-body { flex: 1; min-height: 0; overflow: auto; padding-block: 22px; }
.reader-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 15px; line-height: 1.8; margin: 0; max-width: 68ch; }
.reading-drawer>.form-footer { position: static; flex: none; margin-bottom: 0; }
.reader-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.item-menu { position: fixed; margin: 0; width: 240px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 8px 28px #27272716; }
.item-menu::backdrop { background: transparent; }
.menu-heading { display: flex; align-items: center; gap: 8px; padding: 2px 5px 8px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.menu-heading h2 { flex: 1; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item { width: 100%; justify-content: flex-start; gap: 10px; padding: 9px 12px; border-radius: 5px; font-weight: 400; min-height: 36px; font-size: 14px; }
.clip-content { white-space: normal; display: block; min-width: 0; width: 100%; text-align: left; padding: 0; justify-content: flex-start; min-height: 38px; line-height: 20px; }
.clip-content:hover { background: transparent; }
.clip-content pre { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--content); line-height: 20px; }
.paste-text-jobs { display: grid; gap: 8px; margin-bottom: 12px; }
.paste-text-jobs:empty { display: none; }
.paste-text-job { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid var(--error-line); background: var(--error-bg); border-radius: 7px; }
.paste-text-job>div { min-width: 0; flex: 1; }
.paste-text-job pre { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 5px; max-height: 48px; overflow: hidden; }
.paste-job-status { font-size: 12px; color: var(--error-text); }
.file-media-icon { display: block; flex: none; width: 32px; }
.media-tile { position: relative; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); place-items: center; width: 38px; height: 38px; min-height: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface-soft); color: var(--muted); flex: none; }
.media-tile:hover { background: var(--surface-hover); border-color: var(--field-line); }
.media-tile img { display: block; min-width: 0; min-height: 0; width: 100%; height: 100%; object-fit: contain; }
.media-tile.compact { width: 38px; height: 38px; }
.media-tile.compact>.icon { width: 16px; height: 16px; }
.media-tile .media-play-badge { position: absolute; right: 3px; bottom: 3px; width: 17px; height: 17px; padding: 3px; background: #252525b8; border-radius: 50%; color: white; fill: white; stroke: white; }
.media-tile.compact .media-play-badge { width: 13px; height: 13px; padding: 2px; right: 1px; bottom: 1px; }
.media-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.media-tile-state,.file-media-status { font-size: 12px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.file-media-status { display: block; margin-top: 2px; }
.media-detail-content img,.media-detail-content video { display: block; width: 100%; max-height: min(60dvh,420px); object-fit: contain; border-radius: 7px; background: #191919; }
.media-detail-status,.media-detail-error { font-size: 12px; line-height: 1.75; color: var(--muted); margin-top: 10px; overflow-wrap: anywhere; }
.media-detail-error { color: var(--danger); }
.media-detail-loading { font-size: 14px; color: var(--muted); text-align: center; }
#file-drawer.media-viewer[open] { display: flex; flex-direction: column; inset: 24px auto auto 24px; margin: 0; width: calc(100vw - 48px); max-width: calc(100vw - 48px); height: calc(100dvh - 48px); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#file-drawer.media-viewer>.dialog-heading { position: static; flex: none; margin: 0; padding: 16px 24px; border-bottom: 1px solid var(--line); }
#file-drawer.media-viewer .dialog-heading h2 { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#file-drawer.media-viewer .file-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; flex: 1; min-height: 0; min-width: 0; overflow: hidden; }
#file-drawer.media-viewer #file-drawer-preview { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 24px; background: var(--surface-soft); overflow: auto; }
#file-drawer.media-viewer .media-detail-content { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); place-items: center; flex: 1; min-width: 0; min-height: 180px; overflow: hidden; }
#file-drawer.media-viewer .media-detail-content>* { grid-area: 1 / 1; }
#file-drawer.media-viewer .media-detail-content img,#file-drawer.media-viewer .media-detail-content video { min-width: 0; min-height: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; border-radius: 0; background: transparent; }
#file-drawer.media-viewer .media-detail-loading { z-index: 1; }
#file-drawer.media-viewer .file-detail-info { min-width: 0; padding: 24px; overflow: auto; border-left: 1px solid var(--line); }
#file-drawer.media-viewer .detail-meta { margin: 0 0 24px; grid-template-columns: 64px minmax(0,1fr); }
@media (max-width: 960px) {
  #file-drawer.media-viewer[open] { inset: 0 auto auto 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  #file-drawer.media-viewer>.dialog-heading { padding: 16px 20px; }
  #file-drawer.media-viewer .file-detail-layout { display: flex; flex-direction: column; overflow: auto; }
  #file-drawer.media-viewer #file-drawer-preview { flex: 1 0 auto; min-height: 260px; height: 60dvh; padding: 16px; overflow: visible; }
  #file-drawer.media-viewer .file-detail-info { flex: none; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  #file-drawer.media-viewer .detail-meta { margin-bottom: 16px; }
}
.share-media { margin: 0 0 20px; display: flex; flex-direction: column; gap: 8px; }
.share-media .media-tile { width: 100%; height: 156px; }
.share-media .media-tile>.icon:not(.media-play-badge) { width: 28px; height: 28px; }
.share-media .media-play-badge { width: 30px; height: 30px; padding: 6px; right: 12px; bottom: 12px; }
.share-media .media-tile-state { font-size: 12px; }
#workspace { width: 100%; margin-inline: 0; }
.file-size,.file-expiry,.file-meta { font-size: 12px; }
.todo-toggle { display: grid; place-items: center; width: 38px; height: 38px; flex: none; cursor: pointer; }


/* Content-first rows: metadata and actions stay together; names keep extensions. */
input:not([type=file]):not([type=checkbox]),select { height: 38px; line-height: 20px; }
button.primary.danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
button.primary.danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.section-heading>div { min-width: 0; }
.section-heading h1 { overflow-wrap: anywhere; }
.toolbar .list-status:empty { display: none; }
.paste-zone:empty::before { content: attr(data-placeholder); pointer-events: none; }
.filename { display: inline-flex; align-items: baseline; min-width: 0; max-width: 100%; vertical-align: bottom; overflow: hidden; }
.filename-stem { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filename-extension { flex: none; white-space: nowrap; }
.file-title-button { min-width: 0; }
.clip-media { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.clip-media>.icon { width: 20px; height: 20px; color: var(--muted); }
.clip-media .media-tile img { object-fit: contain; }
.clip-media .media-tile-state { text-align: center; }
.clip-media-card { grid-template-columns: 80px minmax(0,1fr); min-height: 84px; }
.clip-media-card .media-tile { width: 80px; height: 60px; }
.clip-text-card { grid-template-columns: minmax(0,1fr); }
.clip-content-block { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; min-width: 0; }
.clip-card>.clip-content-block { grid-column: 2; grid-row: 1; }
.clip-text-card>.clip-content-block { grid-column: 1; }
.clip-content-block>.clip-content { grid-column: 1; grid-row: 1; min-width: 0; }
.clip-content-block>.clip-card-bottom { grid-column: 2; grid-row: 1; }
.clip-text-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: 40px; }
.clip-card-bottom>.file-meta { min-width: 0; max-width: 160px; font-size: 12px; line-height: 18px; text-align: right; margin: 0; overflow-wrap: anywhere; }
.clip-card-bottom>.file-actions { flex: none; gap: 0; }
.account-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 12px; min-width: 0; }
.account-summary>div:first-child { min-width: 0; flex: 1 1 100px; }
.account-summary-name { min-width: 0; flex: 1 1 120px; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.account-summary-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.confirm-dialog { width: 400px; padding: 20px; border-color: var(--line); border-radius: 10px; }
.confirm-dialog .dialog-heading { margin-bottom: 14px; align-items: center; }
.confirm-dialog .dialog-heading h2 { font-size: 18px; }
.confirm-dialog #confirm-description { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.confirm-dialog #confirm-impact { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 8px; overflow-wrap: anywhere; }
.confirm-actions { position: sticky; bottom: -20px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 16px -20px -20px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--paper); }
.confirm-actions button { min-width: 76px; }
dialog #notice { left: 50%; right: auto; transform: translateX(-50%); width: min(350px,calc(100vw - 32px)); max-width: none; }
dialog.drawer #notice { left: auto; right: 24px; bottom: 104px; transform: none; width: calc(100vw - 48px); max-width: 472px; }
.list-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--error-line); border-radius: 6px; background: var(--error-bg); margin: 10px 0; }
.list-feedback .form-error { flex: 1; min-width: 100px; margin: 0; color: var(--danger); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.list-feedback .list-retry { flex: none; }
.list-placeholder { width: 100%; background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.skeleton-row { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 12px; align-items: center; min-height: 72px; padding: 14px; border-bottom: 1px solid var(--line); }
.skeleton-row:last-child { border-bottom: 0; }
.skeleton-icon { width: 28px; height: 28px; border-radius: 5px; background: var(--accent-soft); }
.skeleton-lines { min-width: 0; }
.skeleton-lines span { display: block; height: 12px; width: 55%; max-width: 480px; border-radius: 3px; background: var(--accent-soft); }
.skeleton-lines span+span { width: 35%; margin-top: 8px; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

@media (max-width:1180px) {
  .table-heading,.file-row { grid-template-columns: minmax(120px,1fr) 64px 142px 128px 80px; gap: 10px; }
  .file-created { font-size: 12px; }
  .timeline-record { grid-template-columns: 76px 134px minmax(0,1fr) 38px; gap: 10px; }
}

@media (max-width:1050px) {
  .table-heading,.file-row { grid-template-columns: minmax(120px,1fr) 64px 142px 128px 80px; gap: 10px; padding-inline: 12px; }
  :root { --main-gutter: 24px; }
}

@media (max-width:950px) and (min-width:721px) {
  .file-created { display: none; }
  .table-heading,.file-row { grid-template-columns: minmax(100px,1fr) 58px 128px 80px; gap: 10px; }
  .table-heading>span:nth-child(3) { display: none; }
  .timeline-record { grid-template-columns: 100px minmax(0,1fr) 38px; }
  .timeline-subject { grid-column: 1; grid-row: 2; }
  .timeline-record>.icon-button { grid-column: 3; grid-row: 1; }
  .timeline-filters .search-field { width: auto; flex: 1; }
  .timeline-filters .toolbar { flex-wrap: wrap; }
  .timeline-read { grid-column: 2; grid-row: 1/3; }
}

@media (max-width:720px) {
  :root { --sidebar: 0px; --main-gutter: 16px; }
  .app-shell { display: block; }
  .sidebar { position: static; width: auto; padding: 0; border: 0; background: transparent; }
  .brand,.sidebar-bottom { display: none; }
  .main-nav button { flex-direction: column; justify-content: center; gap: 4px; height: 52px; font-size: 12px; border-radius: 7px; padding: 4px 6px; }
  .main-nav button .icon { width: 19px; height: 19px; }
  .main-nav button.selected { background: var(--surface-hover); }
  .main-shell { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 max(16px,env(safe-area-inset-left)); height: 44px; }
  .topbar-actions { gap: 4px; }
  .theme-toggle { width: 44px; min-height: 44px; padding: 12px; }
  .topbar .workspace-word { color: var(--muted); }
  .breadcrumbs { gap: 11px; }
  .privacy-badge { font-size: 12px; }
  .main-shell footer { padding: 10px 16px; height: auto; font-size: 12px; min-height: 40px; gap: 8px; flex-wrap: wrap; }
  .section-heading { margin-bottom: 10px; align-items: center; gap: 10px; }
  .section-heading h1 { font-size: 19px; }
  .section-heading p { font-size: 12px; max-width: 250px; }
  .toolbar { gap: 6px; margin-bottom: 10px; }
  .search-field { width: auto; flex: 1; min-width: 0; }
  .default-note { display: none; }
  .table-heading { display: none; }
  .file-size,.file-expiry { display: none; }
  .file-info { gap: 9px; }
  .file-type-icon { width: 28px; }
  .mobile-meta { display: flex; flex-wrap: wrap; gap: 0 5px; font-size: 12px; color: var(--muted); margin-top: 3px; white-space: normal; }
  .mobile-meta>span { white-space: nowrap; }
  .file-actions .icon-button { width: 44px; min-height: 44px; padding: 12px; }
  .pagination { padding: 13px 0; }
  .empty { padding: 42px 14px; }
  .paste-zone { padding: 8px 12px; font-size: 14px; min-height: 44px; gap: 8px; }
  .paste-zone .icon { width: 18px; }
  .paste-zone span { max-width: 250px; }
  .clip-list { gap: 9px; }
  .clip-card .file-meta { font-size: 12px; }
  .clip-card-bottom .file-actions { margin-left: 0; gap: 0; }
  .credential-date { display: none; }
  .credential-detail { padding: 12px; }
  .secret-row { gap: 6px 10px; grid-template-columns: minmax(0,1fr) auto; }
  .settings-card { padding: 16px; }
  .setting-row { gap: 8px; align-items: center; flex-direction: row; flex-wrap: wrap; padding: 8px 0; }
  .setting-row>label { font-size: 12px; flex: 1 1 92px; }
  .retention-control select { min-width: 120px; font-size: 14px; height: 44px; min-height: 44px; }
  .retention-control input[type=number] { width: 64px; height: 44px; min-height: 44px; }
  .form-columns { grid-template-columns: 1fr; gap: 14px; }
  .auth-card { padding: 24px; margin: 30px auto; max-width: 360px; }
  .auth-card h1 { font-size: 23px; }
  .auth-card>.muted { font-size: 14px; }
  .retry-strip { flex-wrap: wrap; }
  .retry-strip span { min-width: 100%; }
  .retry-strip button { min-height: 44px; }
  .share-created .ghost { min-height: 44px; }
  .share-row button { min-height: 44px; }
  .progress-card { grid-template-columns: minmax(70px,1fr) 80px auto; }
  .doc-links { gap: 14px; }
  .doc-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .credential-header .credential-name { font-size: 14px; }
  .form-footer button { font-size: 14px; }
  .main-nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--soft-line); gap: 0; padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); background: var(--nav-surface); backdrop-filter: blur(18px); z-index: 25; }
  .main-nav .nav-secondary,.main-nav .nav-separator { display: none; }
  .main-nav .mobile-more { display: flex; }
  .clip-card h3 { font-size: 14px; }
  .clip-card pre { font-size: 14px; padding: 0; min-height: 0; line-height: 20px; }
  .clip-card-bottom .icon-button { width: 44px; min-height: 44px; padding: 12px; }
  .file-row { grid-template-columns: minmax(0,1fr) 88px; padding: 10px 12px; min-height: 72px; gap: 8px; }
  .file-row .file-actions .icon-button { width: 44px; min-height: 44px; padding: 12px; }
  .file-name,.file-title-button { font-size: 14px; }
  .file-created { display: none; }
  .record-row { padding: 10px 12px; gap: 8px; min-height: 72px; }
  .record-title { font-size: 14px; }
  .record-preview { font-size: 14px; }
  .record-row>.icon-button { width: 44px; min-height: 44px; padding: 12px; }
  .todo-checkbox { width: 22px; height: 22px; border-radius: 6px; }
  .todo-checkbox:checked:after { left: 7px; top: 4px; }
  .record-time { font-size: 12px; }
  .timeline-filters .toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 44px; gap: 8px; }
  .timeline-filters .search-field { grid-column: 1/3; width: 100%; }
  .timeline-filters .toolbar>select { width: 100%; max-width: none; font-size: 14px; min-height: 44px; }
  .timeline-filters .toolbar>#timeline-device { grid-column: 1; grid-row: 2; }
  .timeline-filters .toolbar>#timeline-harness { grid-column: 2; grid-row: 2; }
  .timeline-filters .toolbar>#timeline-refresh { grid-column: 3; grid-row: 1; }
  .filter-toggle .icon { width: 18px; height: 18px; }
  .filter-toggle { display: inline-flex; grid-column: 3; grid-row: 2; padding: 12px; min-height: 44px; font-size: 0; gap: 0; width: 44px; }
  .timeline-advanced { display: flex; gap: 10px; }
  .timeline-advanced>label { max-width: none; min-width: 130px; }
  .timeline-advanced>label:first-child { flex-basis: 100%; }
  .timeline-advanced select,.timeline-advanced input,.timeline-advanced button { min-height: 44px; }
  .timeline-caption { font-size: 12px; line-height: 1.7; }
  .timeline-record { grid-template-columns: minmax(0,1fr) 44px; gap: 6px 10px; padding: 12px; }
  .timeline-time { grid-column: 1; grid-row: 1; font-size: 12px; }
  .timeline-subject { grid-column: 1; grid-row: 2; flex-direction: row; flex-wrap: wrap; gap: 5px 8px; align-items: center; font-size: 12px; }
  .timeline-description { grid-column: 1/-1; grid-row: 3; font-size: 14px; line-height: 1.8; }
  .timeline-record>.icon-button { grid-column: 2; grid-row: 1/3; width: 44px; min-height: 44px; padding: 12px; }
  .timeline-environment { font-size: 12px; }
  .secret-actions .icon-button { width: 44px; min-height: 44px; padding: 12px; }
  .secret-value { font-size: 14px; min-height: 44px; padding: 8px; grid-column: 1; }
  dialog.drawer { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  dialog.drawer .dialog-heading { top: -20px; margin-inline: -20px; padding: 16px 20px; }
  dialog.drawer .dialog-heading>.icon-button { width: 44px; min-height: 44px; padding: 12px; margin-top: -8px; }
  dialog.drawer .form-footer { bottom: calc(-20px - env(safe-area-inset-bottom)); margin-inline: -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
  dialog.drawer .form-footer button { min-height: 44px; }
  dialog.drawer input:not([type=checkbox]),dialog.drawer select { min-height: 44px; font-size: 16px; }
  dialog.drawer textarea { font-size: 16px; max-height: none; min-height: 150px; }
  .more-menu { position: fixed; left: 0; right: 0; top: auto; bottom: 0; margin: 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; width: 100%; max-width: 100%; }
  .more-menu::backdrop { background: var(--backdrop); }
  .more-nav button { min-height: 54px; }
  .section-heading>button,.section-heading>.button { font-size: 14px; min-height: 44px; padding: 8px 10px; }
  .paste-actions .button,.paste-actions button { min-height: 44px; font-size: 12px; }
  .toolbar .icon-button { width: 44px; min-height: 44px; }
  .pagination button { min-height: 44px; font-size: 12px; }
  input:not([type=file]):not([type=checkbox]),select,textarea { font-size: 16px; min-height: 44px; }
  .main-shell main { padding: 14px max(16px,env(safe-area-inset-right)) 18px max(16px,env(safe-area-inset-left)); min-height: calc(100dvh - 156px); }
  .toolbar .search-field input[type=search] { font-size: 16px; height: 44px; min-height: 44px; }
  .toolbar>select { font-size: 14px; max-width: 118px; height: 44px; min-height: 44px; }
  .credential-header { min-height: 56px; padding: 10px 12px; }
  .list-status { font-size: 12px; }
  .detail-actions .ghost,.detail-actions>.icon-button { min-height: 44px; }
  .authorization-heading { gap: 8px; }
  .authorization-heading h2 { font-size: 16px; }
  .authorization-heading>span { font-size: 12px; }
  .authorization-heading>.ghost { min-height: 44px; font-size: 12px; padding: 6px 9px; }
  .grant-row { grid-template-columns: minmax(0,1fr) auto; gap: 7px 8px; padding: 12px; min-height: 80px; }
  .grant-main { grid-column: 1; grid-row: 1; min-height: 35px; }
  .grant-timing { grid-column: 1; grid-row: 2; align-items: flex-start; flex-direction: row; gap: 8px; flex-wrap: wrap; }
  .grant-timing .record-time { font-size: 12px; }
  .grant-row>.ghost { grid-column: 2; grid-row: 1/3; min-height: 44px; font-size: 12px; padding: 7px 9px; }
  .authorization-list-heading>.icon-button { width: 44px; min-height: 44px; }
  .metadata-list { grid-template-columns: 74px minmax(0,1fr); gap: 12px 10px; font-size: 12px; }
  .authorization-scope p { font-size: 14px; }
  .authorization-code-box strong { font-size: 26px; }
  .authorization-name { font-size: 18px; }
  #authorization-dialog .form-footer button { min-width: 100px; }
  .quick-add-form input:not([type=checkbox]),.quick-add-form>.primary { height: 44px; min-height: 44px; }
  .timeline-date { padding: 12px; font-size: 12px; }
  .timeline-read { grid-column: 1/-1; grid-row: 3; }
  .filter-chip { min-height: 44px; font-size: 12px; }
  .filter-chips>.text-button { min-height: 44px; }
  #todo-notes-toggle { min-height: 44px; }
  .paste-text-job { align-items: flex-start; gap: 8px; }
  .paste-text-job>.ghost { min-height: 44px; font-size: 12px; }
  dialog.reading-drawer { padding-inline: 20px; }
  .reading-drawer>.dialog-heading { margin-inline: -20px; }
  .reading-drawer>.form-footer { margin-inline: -20px; }
  .item-menu { top: auto !important; left: 0 !important; right: 0; bottom: 0; width: 100%; max-width: 100%; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; }
  .item-menu::backdrop { background: var(--menu-backdrop); }
  .menu-item { min-height: 44px; }
  .menu-heading .icon-button { width: 44px; min-height: 44px; }
  .reader-actions>.ghost,.reader-actions>.icon-button { min-height: 44px; }
  .reader-actions>.icon-button { width: 44px; }
  .media-tile-state,.file-media-status { font-size: 12px; }
  .media-detail-status,.media-detail-error { font-size: 12px; }
  .media-detail-content video { max-height: 60dvh; }
  .share-media .media-tile { height: 148px; }
  button,.button { min-height: 44px; }
  .icon-button { width: 44px; min-height: 44px; padding: 12px; }
  .paste-actions { font-size: 12px; padding: 0 8px; min-height: 45px; }
  .todo-toggle { width: 44px; height: 44px; }
  .quick-add-form input { font-size: 16px; }
  .filter-chips { flex-wrap: wrap; }
  .secret-label { grid-column: 1/-1; padding: 0; }
  .secret-actions { grid-column: 2; }
  .credential-header .credential-date { display: none; }
  .credential-detail-footer button { font-size: 14px; min-height: 44px; }
  .bin-row button { min-height: 44px; }
  .retention-control { flex-wrap: wrap; width: auto; flex: 0 1 auto; max-width: 100%; }
  .form-footer { flex-wrap: wrap; }
  .file-title-button,.record-main,.clip-content,.timeline-read { min-height: 44px; }
  .file-media-icon { width: 44px; }
  .media-tile.compact { width: 44px; height: 44px; }
  /* Two-line reading above a shared metadata/action footer. */
  input:not([type=file]):not([type=checkbox]),select { height: 44px; }
  .search-field { height: 44px; min-height: 44px; border: 0; box-shadow: inset 0 0 0 1px var(--line); }
  .search-field:focus-within { box-shadow: inset 0 0 0 1px var(--focus-border); }
  .paste-zone:empty::before { content: attr(data-placeholder-mobile); }
  .file-actions { gap: 0; }
  .clip-card { grid-template-columns: 44px minmax(0,1fr); gap: 6px 10px; padding: 8px 12px; min-height: 112px; }
  .clip-media { grid-column: 1; grid-row: 1; align-self: center; }
  .clip-media-card { grid-template-columns: 72px minmax(0,1fr); min-height: 124px; }
  .clip-text-card { grid-template-columns: minmax(0,1fr); }
  .media-tile { width: 44px; height: 44px; }
  .clip-media-card .media-tile { width: 72px; height: 54px; }
  .clip-content-block { display: contents; }
  .clip-content-block>.clip-content { grid-column: 2; grid-row: 1; min-height: 44px; }
  .clip-text-card .clip-content-block>.clip-content { grid-column: 1; }
  .clip-content-block>.clip-card-bottom { grid-column: 1/-1; grid-row: 2; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
  .clip-card-bottom>.file-meta { flex: 1; text-align: left; max-width: none; }
  .clip-card-bottom>.file-actions { margin-left: auto; }
  .clip-text-summary { max-height: 40px; }
  #todos-panel .record-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow-wrap: anywhere; max-height: 42px; }
  #notice,dialog #notice,dialog.drawer #notice { left: max(16px,env(safe-area-inset-left)); right: max(16px,env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom)); width: auto; max-width: none; transform: none; }
  dialog.drawer #notice { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .confirm-dialog { max-height: calc(100dvh - 32px); }
  .confirm-actions button { min-width: 88px; min-height: 44px; }
  .confirm-dialog .dialog-heading>.icon-button { width: 44px; min-height: 44px; }
  .list-feedback .list-retry { min-height: 44px; }
  .skeleton-row { min-height: 84px; }
  .clip-list .skeleton-row { min-height: 112px; }
}

@media (max-width:380px) {
  .section-heading p { max-width: 190px; }
  .retention-control { gap: 4px; }
  .retention-control select { min-width: 100px; }
  .retention-control input[type=number] { width: 48px; }
}

@media (max-width:720px),(max-width:1024px) and (pointer:coarse) {
  dialog.drawer { top: var(--drawer-viewport-top,0px); bottom: auto; height: var(--drawer-viewport-height,100dvh); max-height: var(--drawer-viewport-height,100dvh); }
  dialog.drawer.editor-drawer[open] { display: flex; flex-direction: column; overflow: hidden; padding: 0 20px; border: 0; }
  dialog.drawer.editor-drawer>.dialog-heading { position: static; flex: none; margin-bottom: 0; margin-inline: -20px; padding: 16px 20px; }
  dialog.drawer.editor-drawer>form { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
  dialog.drawer.editor-drawer>form>.drawer-body { display: block; flex: 1; min-height: 0; overflow-y: auto; padding: 16px 0 20px; scroll-padding-block: 12px; }
  dialog.drawer.editor-drawer>form>.form-footer { position: static; flex: none; margin: 0-20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
  dialog.drawer input:not([type=checkbox]),dialog.drawer select,dialog.drawer textarea { font-size: 16px; }
  dialog.drawer.editor-drawer .form-footer button { min-height: 44px; }
}

@media (prefers-reduced-motion:reduce) {
  * { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
}
