* {
  box-sizing: border-box;
}
[hidden] {
  display: none!important;
}
:root {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light;
  --paper: #f8f7f2;
  --surface: #fffefa;
  --ink: #282d28;
  --muted: #687067;
  --sage: #52644f;
  --soft: #e5eadf;
  --line: #dedfd6;
  --sunken: #eeeee7;
  /* Filled buttons: light and calm, readable ink (see theme.mjs; 外观 may override all of these). */
  --btn-primary: #b4c9b1;
  --btn-primary-hover: #a8c0a5;
  --btn-primary-ink: #2b3e28;
  font: 16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;
  color: var(--ink);
  background: var(--paper);
}
body {
  margin: 0;
}
main {
  max-width: 590px;
  margin: auto;
  padding: max(28px,env(safe-area-inset-top)) 22px calc(112px + env(safe-area-inset-bottom));
}
header,.head,.pager,.switch {
  display: flex;
  align-items: center;
  gap: 12px;
}
header,.head {
  justify-content: space-between;
}
main > header {
  margin-bottom: 16px;
}
main > section {
  display: flow-root;
}
main > section > :first-child {
  margin-top: 0;
}
#title:focus {
  outline: none;
}
h1,h2,h3,p {
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -.03em;
}
h2 {
  font-size: 25px;
  line-height: 1.35;
}
h3 {
  font-size: 18px;
}
button,input,select,textarea {
  font: inherit;
  color: inherit;
}
button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  background: transparent;
  min-height: 44px;
}
button:disabled {
  opacity: .5;
  cursor: default;
}
button:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 2px;
}
input:focus,select:focus,textarea:focus {
  outline: 2px solid var(--sage);
  outline-offset: -2px;
}
.icon {
  width: 24px;
  height: 24px;
  flex: none;
}
.iconbtn {
  width: 44px;
  color: var(--sage);
  display: grid;
  place-items: center;
}
.status {
  color: var(--sage);
  margin: 16px 0;
}
.status:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  margin-right: 8px;
}
.paper {
  display: block;
  width: 100%;
  height: clamp(128px,21vh,210px);
  object-fit: contain;
  object-position: right center;
  margin: 10px 0 16px;
}
.sub,small,dialog p,.card p {
  color: var(--muted);
}
.sub {
  margin: 8px 0 24px;
}
.launch,.soft {
  background: var(--soft);
  color: var(--sage);
  font-weight: 650;
}
/* 选择文件 and 从云盘打印 (Android HomeScreen.fileSourceAction): one kind of row, the soft accent
   fill, a 36 px icon, the label in the accent, a chevron; at least 76 px tall. */
.launch {
  width: 100%;
  min-height: 76px;
  padding: 16px 18px 16px 22px;
  display: flex;
  align-items: center;
  text-align: left;
  margin-bottom: 12px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
}
.launch > .icon:first-child {
  width: 36px;
  height: 36px;
}
.launch > span {
  flex: 1;
  min-width: 0;
  margin: 0 12px 0 26px;
}
.launch > .icon:last-child {
  width: 19px;
  height: 19px;
}
.primary,.soft {
  padding: 10px 18px;
}
.primary {
  background: var(--btn-primary);
  color: var(--btn-primary-ink);
  font-weight: 650;
}
.primary:active:not(:disabled) { background: var(--btn-primary-hover); }
@media (hover:hover) { .primary:hover:not(:disabled) { background: var(--btn-primary-hover); } }
.card,.rows {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  margin: 14px 0;
  overflow: hidden;
}
.card {
  padding: 18px;
}
.card button,.card p {
  margin-top: 10px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  width: 100%;
  text-align: left;
  border-radius: 0;
}
.row+.row {
  border-top: 1px solid var(--line);
}
.row .icon {
  color: var(--sage);
}
.row span {
  min-width: 0;
  flex: 1;
}
.row strong,.row small {
  display: block;
  overflow-wrap: anywhere;
}
.row small {
  margin-top: 3px;
  font-size: 13px;
}
.empty {
  padding: 22px 0;
  color: var(--muted);
}
nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px max(8px,calc((100vw - 590px)/2)) max(5px,env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}
nav a {
  flex: 1;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
}
nav a span {
  display: grid;
  place-items: center;
  border-radius: 20px;
  width: 48px;
  height: 30px;
}
nav [aria-current] {
  color: var(--sage);
  font-weight: bold;
}
nav [aria-current] span {
  background: transparent;
}
dialog {
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  color: var(--ink);
  width: min(100%,540px);
  max-width: 100%;
  max-height: 90dvh;
  margin: auto auto 0;
  padding: 10px 20px max(22px,env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
}
.handle {
  width: 40px;
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  margin: 0 auto 14px;
}
.head h2 {
  font-size: 22px;
  color: var(--sage);
}
form,label {
  display: grid;
  min-width: 0;
  gap: 8px;
}
form {
  gap: 12px;
  margin: 12px 0;
}
input,select,textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--surface);
  width: 100%;
  min-width: 0;
}
input:not([type="checkbox"]),select,textarea {
  -webkit-appearance: none;
  appearance: none;
  font-size: 16px;
  line-height: 22px;
  height: 44px;
  padding: 10px 12px;
}
select {
  padding-right: 32px;
  background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position: calc(100% - 17px) 19px,calc(100% - 12px) 19px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}
input[type="number"] {
  -moz-appearance: textfield;
}
input::-webkit-inner-spin-button,input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
label {
  font-size: 14px;
  color: var(--muted);
}
.switch {
  display: flex;
}
.switch input {
  width: auto;
  accent-color: var(--sage);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.grid .wide { grid-column: 1 / -1; }
#canvasBox {
  background: var(--sunken);
  border-radius: 12px;
  padding: 8px;
  margin-top: 8px;
  display: grid;
  place-items: center;
  min-height: 60px;
}
canvas {
  display: block;
  max-width: 100%;
  max-height: 27vh;
  object-fit: contain;
}
.pager {
  justify-content: center;
  font-size: 14px;
}
.pager button {
  min-width: 44px;
  font-size: 24px;
}
.search {
  margin: 16px 0;
}
#notice,#indicator {
  margin: 12px 0;
  padding: 10px 14px;
  background: var(--soft);
  border-radius: 10px;
}
#filename {
  overflow-wrap: anywhere;
}
#progress {
  text-align: center;
}
#progress p {
  margin: 8px 0 16px;
}
.motion {
  color: var(--sage);
  margin: 14px auto;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  background: var(--soft);
  border-radius: 18px;
  position: relative;
}
.motion i { position:absolute; left:50%; top:50%; width:6px; height:2px; margin:-1px 0 0 -3px; background:currentColor; border-radius:2px; }
#loginNote,#printNote {
  color: #95512e;
  overflow-wrap: anywhere;
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior: auto!important;
  }
}
.pager .zoom {
  font-size: 14px;
  color: var(--sage);
}
#largePage canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
#picker {
  min-height: min(68dvh,610px);
}
nav a { min-width:0; }
.person-row { display:block;width:100%;text-align:left;padding:12px 14px;background:var(--surface);border-bottom:1px solid var(--line);border-radius:10px;color:var(--ink);overflow-wrap:anywhere; }
#peopleList,#conversations { margin:10px 0;color:var(--muted); }
#thread[open] { display:flex;flex-direction:column;height:100dvh;max-height:100dvh;margin:0 auto;width:min(100%,590px);padding:0;border-radius:0;background:var(--paper); }
#thread header,#composer { background:var(--surface);border-bottom:1px solid var(--line);padding:10px 12px; }
#thread header { justify-content:flex-start;padding-top:max(12px,env(safe-area-inset-top)); }
#thread header h2 { font-size:20px; }
#bubbles { flex:1;min-height:0;overflow:auto;padding:14px; }
.bubble-row,.chat-wait { display:flex;align-items:flex-start;flex-direction:column;margin-bottom:14px; }
.bubble-row.out,.chat-wait.out { align-items:flex-end; }
.bubble { max-width:78%;padding:10px 13px;background:var(--sunken);color:var(--ink);border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere; }
.out .bubble { background:var(--soft); }
.bubble strong,.bubble small { display:block; }
.chat-image { display:grid;place-items:center;width:min(280px,calc(86vw - 48px));height:200px;padding:0;margin-bottom:8px;overflow:hidden; }
.chat-image img { width:100%;height:100%;object-fit:contain; }
.chat-actions { display:flex;flex-wrap:wrap;gap:5px;max-width:95%;margin-top:5px; }
.chat-actions button,.chat-meta button { padding:4px 10px;min-height:34px;font-size:13px;border-radius:20px;background:var(--surface);border:1px solid var(--line);color:var(--sage); }
.chat-meta,.chat-wait,#threadNote { font-size:13px;color:var(--muted); }
#threadNote:not(:empty){padding:6px 12px}
#composer { display:flex;align-items:center;gap:5px;margin:0;padding-bottom:max(9px,env(safe-area-inset-bottom));border-top:1px solid var(--line); }
#composer textarea{flex:1;width:0;min-width:0;resize:none;max-height:var(--viewport-composer,132px);overflow:auto}#composer .iconbtn{width:44px;flex:none;padding:0;}
#largePhoto{max-width:100%;max-height:75dvh;display:block;margin:auto;}
#share .row[aria-pressed="true"]{background:var(--soft);}
#share .tick{font-size:18px;color:var(--sage);}
#shareList{max-height:44dvh;overflow:auto;margin:10px 0;}
#batchBar{margin:9px 0;display:flex;align-items:end;gap:8px;}
#batchBar label{flex:1;min-width:0;}
.cloud-actions-line{display:flex;align-items:center;border-bottom:1px solid var(--line);padding-right:8px}.cloud-actions-line .row{flex:1;min-width:0}.cloud-actions-line>button:last-child{flex:none;padding:6px 10px;}
.chat-image{grid-template: minmax(0,1fr) / minmax(0,1fr)}.chat-image img{min-height:0;min-width:0}#peerName{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-header-action{font-size:13px;color:var(--sage);padding:3px}.peer-preview{display:block;font-size:13px;color:var(--muted)}[data-tab=chat]{position:relative}#chatCount{position:absolute;top:1px;right:12%;background:var(--sage);color:white;padding:0 4px;border-radius:8px;font:11px/16px sans-serif}

/* Android motion timing with native browser links, focus and dialog lifecycles. */
:root { --motion-ease: cubic-bezier(.22,1,.36,1); }
nav a { position:relative; z-index:1; text-decoration:none; min-height:44px; padding:0 2px; }
nav .nav-indicator { position:absolute; z-index:0; top:0; left:0; border-radius:20px; background:var(--soft); transition:transform 240ms var(--motion-ease); pointer-events:none; }
button,a,input,select,textarea,label,[role="button"],.is-tappable { -webkit-tap-highlight-color: transparent; }
/* Quick taps (份数 −/+) never zoom the page; the rules that set their own touch-action keep it. */
button,a,label,[role="button"] { touch-action:manipulation; }
button,.launch,nav a { transition:background-color 180ms var(--motion-ease),color 180ms var(--motion-ease),transform 120ms var(--motion-ease); }
button:active:not(:disabled),.launch:active { transform:scale(.97); }
a:focus-visible { outline:3px solid var(--sage); outline-offset:2px; border-radius:10px; }
.connection { margin:12px 0; padding:12px; border-radius:12px; background:var(--soft); color:var(--ink); }
/* Refresh mark (icon kit variant B), as on the desktop and Android: at rest; turning (ring 0.9s,
   paper nudged over 1.2s); done, a check that pops in over 0.35s. */
.refresh-glyph { display:grid; place-items:center; width:24px; height:24px; flex:none; }
.refresh-glyph svg { grid-area:1/1; width:100%; height:100%; overflow:visible; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.refresh-glyph g,.refresh-done { transform-box:view-box; transform-origin:12px 12px; }
.refresh-done { display:none; }
.is-done .refresh-mark { display:none; }
.is-done .refresh-done { display:block; animation:refresh-pop .35s ease-out both; }
.is-loading .refresh-ring { animation:refresh-spin .9s linear infinite; }
.is-loading .refresh-paper { animation:refresh-feed 1.2s ease-in-out infinite; }
/* Animations off: nothing turns (the reduced-motion rule below stops every animation), so a
   refresh in progress shows the mark itself, still and dimmed, then the check as usual. */
@media(prefers-reduced-motion:reduce) { .is-loading .refresh-mark { opacity:.5; } }
@keyframes refresh-spin { to { transform:rotate(360deg); } }
@keyframes refresh-feed { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-.96px); } }
@keyframes refresh-pop { 0% { transform:scale(.6); opacity:0; } 60% { transform:scale(1.08); opacity:1; } 100% { transform:scale(1); opacity:1; } }
#refresh.is-loading { cursor:progress; }
/* Pull-to-refresh: under the sticky header until pulled. */
.pull-refresh { position:fixed; top:0; left:50%; z-index:2; width:40px; height:40px; display:grid; place-items:center; border-radius:50%;
  background:var(--surface); border:1px solid var(--line); box-shadow:0 2px 10px #20251f1f; color:var(--sage);
  opacity:0; transform:translate(-50%,0); pointer-events:none; }
.pull-refresh .refresh-glyph { width:22px; height:22px; }
.pull-refresh.is-armed { color:var(--ink); }
#thread[open] { top:var(--viewport-top,0px); bottom:auto; height:var(--viewport-height,100dvh); max-height:var(--viewport-height,100dvh); }
/* Dialog entries and exits: see "设置、登录与全局 alignment (round 11)" (exits run from navigation.mjs). */
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; } }

.back-link { display:inline-block; margin-bottom:16px; color:var(--sage); }
.install-icon { flex:none; border-radius:16px; }
.ios-intro header { justify-content:flex-start; }
.ios-intro h1 { font-size:28px; }
.ios-intro li { margin:12px 0; }
.action-link { display:block; text-align:center; text-decoration:none; border-radius:12px; padding:12px; margin-top:16px; }
dialog { position:fixed; top:auto; bottom:var(--viewport-bottom,0px); left:0; right:0; margin:0 auto; max-height:min(90dvh,calc(var(--viewport-height,100dvh) - 16px)); }
dialog > .head { position:sticky; top:0; z-index:2; padding-bottom:8px; background:var(--surface); }
dialog input,dialog select,dialog textarea { scroll-margin-block:72px 24px; }
#picker { min-height:min(68dvh,calc(var(--viewport-height,100dvh) - 16px),610px); }
#shareList { max-height:min(44dvh,var(--viewport-list,44dvh)); }
#thread { overflow:hidden; }
#thread[open] { top:var(--viewport-top,0px); bottom:auto; }
#thread header,#composer,#threadNote { flex-shrink:0; }
#composer { align-items:flex-end; }
#threadNote { max-height:20%; overflow:auto; }
html[data-keyboard="true"] nav { display:none; }
html[data-keyboard="true"] main { padding-bottom:24px; }
html[data-keyboard="true"] #composer { padding-bottom:8px; }
@supports selector(html:has(dialog[open])) { html:has(dialog[open]) { overflow:hidden; } }

.toolbar,.job-actions { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.toolbar button { flex:1; min-width:120px; }
#jobsList .row { display:grid; grid-template-columns:24px minmax(0,1fr); }
.job-actions { grid-column:1/-1; margin:4px 0 0; }
.job-actions button { flex:1; min-width:0; padding:8px; }
.cloud-actions-line { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:0 10px 10px; }
.cloud-actions-line .row { grid-column:1/-1; }
.cloud-actions-line > button { min-width:0; width:100%; padding:8px; }
#uploadStatus,#preferenceStatus,#downloadStatus { overflow-wrap:anywhere; color:var(--muted); }
#downloadName { overflow-wrap:anywhere; }
#downloadShare { width:100%; margin-top:10px; }
/* 保存文件 opens at its final height: two lines kept for the words (three on a narrow phone, in
   the ≤360 px block below), and the link waits as a disabled button does. */
#downloadStatus { min-height:3em; }
/* While the file is decrypted and prepared a bar runs between the name and the words; its place
   is kept once the file is ready or failed, so nothing in the sheet moves. */
.task-bar.download-bar { height:5px; margin:10px 0 8px; }
.task-bar.download-bar:not(.is-indeterminate) { visibility:hidden; }
.action-link[aria-disabled="true"] { opacity:.5; pointer-events:none; }

body.workspace { height:100dvh; overflow:hidden; }
.workspace > main { position:fixed; top:var(--viewport-top,0px); left:0; right:0; height:calc(var(--viewport-height,100dvh) - var(--navigation-height,64px)); overflow:auto; overscroll-behavior:contain; padding-top:0; padding-bottom:24px; }
.workspace > main > header { position:sticky; top:0; z-index:3; gap:0; padding-top:max(28px,env(safe-area-inset-top)); padding-bottom:16px; margin-bottom:0; background:var(--paper); }
.workspace > main > header > h1 { flex:1; min-width:0; margin-right:6px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.workspace > nav { bottom:var(--viewport-bottom,0px); }
html[data-keyboard="true"] .workspace > main { height:var(--viewport-height,100dvh); }
html[data-keyboard="true"] .workspace > main > header { padding-top:8px; padding-bottom:8px; }
html[data-keyboard="true"] .workspace > main > header h1 { font-size:24px; }
#printCountMenu > button { display: block; width: 100%; margin-top: 10px; }
#printCountMenu > button[data-close] { width: auto; margin-left: auto; }

/* Settings › 外观 */
.field-title { margin-top:16px; font-size:14px; color:var(--muted); }
.card .field-title { margin-top:16px; }
.swatches { display:grid; grid-template-columns:repeat(auto-fill,minmax(72px,1fr)); gap:8px; margin-top:8px; }
.card .swatches button { margin-top:0; }
.swatch { display:grid; justify-items:center; gap:6px; padding:8px 4px; min-height:64px; font-size:13px; color:var(--ink); border:1px solid transparent; border-radius:12px; }
.swatch .chip { width:30px; height:30px; border-radius:50%; border:1px solid var(--line); }
.swatch[aria-pressed="true"] { border-color:var(--sage); background:var(--soft); font-weight:650; }
.color-field { margin-top:10px; grid-template-columns:1fr auto; align-items:center; }
input[type="color"] { -webkit-appearance:auto; appearance:auto; width:72px; height:44px; padding:2px; }
.depth-field { margin-top:16px; }
input[type="range"].depth-slider { -webkit-appearance:none; appearance:none; height:32px; padding:0; border:0; background:transparent; }
.depth-slider::-webkit-slider-runnable-track { height:10px; border-radius:5px; background:linear-gradient(to right,var(--depth-light),var(--depth-deep)); }
.depth-slider::-webkit-slider-thumb { -webkit-appearance:none; width:28px; height:28px; margin-top:-9px; border-radius:50%; background:var(--surface); border:2px solid var(--btn-primary-ink); box-shadow:0 1px 4px #20251f33; }
.depth-slider::-moz-range-track { height:10px; border-radius:5px; background:linear-gradient(to right,var(--depth-light),var(--depth-deep)); }
.depth-slider::-moz-range-thumb { width:24px; height:24px; border-radius:50%; background:var(--surface); border:2px solid var(--btn-primary-ink); }
.depth-scale { display:flex; justify-content:space-between; margin-top:2px; }
.appearance-preview { display:flex; gap:8px; margin-top:14px; }
.appearance-preview span { flex:1; display:grid; place-items:center; min-height:44px; border-radius:12px; }

/* Header task mark (Android TaskProgress): the printer with a sheet sliding through while jobs
   run, a count badge, an alert or a clock when a job failed or awaits a decision. It keeps its
   place in the header when there is nothing to show, so the title never shifts. */
:root { --err: #a1452c; --amber: #97691c; }
.task-indicator { position:relative; overflow:visible; }
.task-indicator.is-off { visibility:hidden; pointer-events:none; }
.task-indicator.is-failed { color:var(--err); }
.task-paper { position:absolute; top:4px; left:50%; width:10px; height:14px; margin-left:-5px; border-radius:2px; background:var(--sage); opacity:0; }
.task-indicator.is-running .task-paper { animation:task-paper 1.4s linear infinite; }
@keyframes task-paper { 0% { transform:translateY(-5px); opacity:0; } 16% { opacity:.42; } 78% { opacity:.42; } 100% { transform:translateY(15px); opacity:0; } }
.task-badge { position:absolute; top:2px; right:0; min-width:18px; height:18px; padding:0 4px; border-radius:9px; background:var(--sage); color:#fff; font:700 10px/18px sans-serif; text-align:center; }
.task-indicator.is-failed .task-badge { background:var(--err); }
@media(prefers-reduced-motion:reduce) { .task-indicator.is-running .task-paper { animation:none; opacity:.35; } }

/* Home (Android HomeScreen): the printer line with its dot and a summary, then the illustration
   or, in the same place and size, the running job. */
.printer-status { display:flex; align-items:flex-start; gap:10px; margin:16px 0 4px; }
.printer-status p { margin:0; }
#health { color:var(--muted); font-weight:650; }
#health.is-available { color:var(--sage); }
/* The last result after a read that failed: 未能更新 in the muted colour and plain weight. */
.health-stale { color:var(--muted); font-weight:400; }
#healthSummary { font-size:13px; color:var(--muted); margin-top:2px; }
.status-dot { flex:none; width:10px; height:10px; margin-top:7px; border-radius:50%; transition:background-color 180ms var(--motion-ease); }
.status-dot.is-ready { background:var(--sage); }
.status-dot.is-busy { background:var(--amber); }
.status-dot.is-down { background:var(--err); }
.status-dot.is-unknown { border:1.5px solid var(--muted); }
/* CloudScreen: 20 % of the screen's height, 96–190 (dp there, CSS px here), on every screen. */
/* The illustration or job card fills a fixed-height block. An auto grid row
   can grow to the image's intrinsic height and overlap the controls below. */
.home-hero { height:clamp(96px,20vh,190px); margin:10px 0 16px; }
.home-hero .paper { height:100%; margin:0; }
.hero-job { display:flex; align-items:center; gap:14px; width:100%; height:100%; padding:14px 12px 14px 18px; border-radius:18px; background:var(--soft); color:var(--ink); text-align:left; }
.hero-job > .icon { width:18px; height:18px; color:var(--sage); }
.hero-motion { flex:none; width:44px; height:44px; margin:0; background:transparent; }
.hero-copy { flex:1; min-width:0; display:grid; gap:3px; }
.hero-copy small { font-size:12px; font-weight:700; color:var(--muted); }
.hero-copy strong { font-size:17px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hero-copy span { font-size:13px; color:var(--muted); }

/* Print sheet: 打印颜色 as Android's two-way choice. */
.segmented-field { display:grid; gap:8px; }
.field-label { font-size:14px; color:var(--muted); }
.segmented { position:relative; display:flex; gap:4px; padding:3px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }

/* 打印任务 sheet (Android TaskProgress). */
.task-sheet h2 { color:var(--ink); font-size:24px; }
.task-count { font-size:14px; color:var(--muted); margin:0; }
.task-counts { font-size:14px; color:var(--ink); margin:12px 0 8px; }
.task-cards { display:flex; gap:8px; overflow-x:auto; margin:0 0 8px; padding-bottom:2px; scrollbar-width:none; }
.task-card { flex:none; display:grid; align-content:center; gap:4px; width:178px; min-height:84px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); text-align:left; }
.task-card strong { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.task-card small { font-size:12px; color:var(--muted); }
.task-card[aria-pressed="true"] { background:var(--soft); border-color:var(--sage); }
.task-card[aria-pressed="true"] small { color:var(--sage); }
.task-name { display:block; font-size:20px; margin:6px 0 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.task-bar { flex:1; height:8px; border-radius:4px; background:var(--sunken); overflow:hidden; }
.task-bar i { display:block; height:100%; width:0; border-radius:4px; background:var(--sage); transition:width 400ms var(--motion-ease); }
.task-detail { font-size:14px; color:var(--ink); margin:8px 0 6px; }
.task-detail.is-error { color:var(--err); font-weight:650; }
.task-steps { list-style:none; margin:8px 0 0; padding:0; display:grid; gap:0; }
.task-steps li { position:relative; padding:6px 0 6px 26px; font-size:14px; color:var(--muted); }
.task-steps li::before { content:""; position:absolute; left:4px; top:11px; width:10px; height:10px; border-radius:50%; border:1.5px solid var(--line); background:var(--surface); }
.task-steps li:not(:last-child)::after { content:""; position:absolute; left:9px; top:23px; bottom:-5px; width:1.5px; background:var(--line); }
.task-steps li.is-done { color:var(--ink); }
.task-steps li.is-done::before { background:var(--sage); border-color:var(--sage); }
.task-steps li.is-done:not(:last-child)::after { background:var(--sage); }
.task-steps li.is-focus { color:var(--sage); font-weight:650; }
.task-steps li.is-focus::before { border-color:var(--sage); box-shadow:0 0 0 3px var(--soft); }
.task-notes p { font-size:12px; color:var(--muted); margin:6px 0 0; }
.task-actions { display:flex; gap:8px; margin-top:16px; }
.task-actions button { flex:1; min-height:56px; padding:8px; font-size:15px; }
.primary.danger { background:#f9e6e2; color:var(--err); }

/* 最近任务: a result awaiting the person's decision (Android JobsScreen.addOutcomeActions). */
.job-outcome { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.job-outcome button { min-height:48px; padding:8px 10px; font-size:13px; }
.job-outcome button:last-child { grid-column:1/-1; }
.danger-text { color:var(--err); }

/* 最近打印 (Android JobsScreen): sections in rounded cards, rows with a 28 px mark, a status line
   in the row's tone, the allocation, a note, and actions beside the title. */
.job-section-title { margin:18px 0 8px; font-size:14px; color:var(--muted); }
.job-section:first-child .job-section-title { margin-top:0; }
.job-card { position:relative; border:1px solid var(--line); border-radius:15px; background:var(--surface); overflow:hidden; }
.job-row { padding:14px; display:grid; gap:6px; }
.job-row { position:relative; isolation:isolate; }
.job-row + .job-row::before { content:""; position:absolute; top:0; left:54px; right:0; height:1px; background:var(--line); }
.job-row.is-printing { background:var(--soft); }
.job-row.is-tappable { cursor:pointer; }
/* JobsScreen.placeJobActions: the actions sit beside the name while it keeps room for
   "文件名六个字" (6 × 15 px), otherwise they wrap to a line of their own under it, at the end. */
.job-head { display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px; row-gap:12px; }
.job-mark { flex:none; width:28px; height:28px; display:grid; place-items:center; color:var(--sage); }
.job-mark .icon { width:24px; height:24px; }
.job-mark.motion { margin:0; width:28px; height:28px; background:transparent; border-radius:0; transform:scale(.6); }
.tone-error .job-mark, .tone-error .job-status { color:var(--err); }
.tone-wait .job-mark, .tone-wait .job-status { color:#896c3f; }
.job-copy { flex:1; min-width:90px; display:grid; gap:2px; }
.job-title { font-size:15px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow-wrap:anywhere; }
.job-status { font-size:12px; color:var(--sage); overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.job-row-actions { flex:none; display:flex; align-items:center; gap:2px; margin:-8px -6px 0 auto; }
.text-action { min-height:44px; padding:0 10px; color:var(--sage); font-weight:650; font-size:14px; }
.job-more { width:40px; }
.job-allocation { margin:0 0 0 40px; font-size:12px; color:var(--muted); }
.job-note { margin:0 0 0 40px; font-size:13px; color:var(--muted); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.job-note.is-error { color:var(--err); background:#f9e6e2; border-radius:10px; padding:8px 10px; }
.job-override { width:100%; margin-top:4px; }
.job-row .job-outcome { margin-top:6px; }
.job-pager { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:14px 0; }
/* ListMotion.Placeholder: each grey row a mark and two lines (72 % and 40 % of the room) with a
   short bar at the end, over a divider, a lighter band passing across (still with reduced motion). */
.job-loading { padding:0; }
.ph-row { --inset:17px; --mark:22px; --text:calc(var(--inset) + var(--mark) + 12px); --room:calc(100% - 58px - var(--text)); position:relative; height:64px; }
.cloud-loading .ph-row { --inset:0px; --mark:40px; }
.ph-row + .ph-row::before { content:""; position:absolute; top:0; left:54px; right:0; height:1px; background:var(--line); }
.cloud-loading .ph-row::after { content:""; position:absolute; bottom:0; left:52px; right:0; height:1px; background:var(--line); }
.ph-row i { position:absolute; border-radius:6px; background:var(--sunken) linear-gradient(90deg,var(--sunken) 0 30%,var(--surface) 50%,var(--sunken) 70% 100%) 0 0/300% 100% no-repeat;
  animation:ph-sheen 1200ms linear infinite; }
.ph-row i:nth-child(1) { left:var(--inset); top:calc(50% - 11px); width:var(--mark); height:22px; }
.ph-row i:nth-child(2) { left:var(--text); top:calc(50% - 10px); width:calc(var(--room) * .72); height:11px; }
.ph-row i:nth-child(3) { left:var(--text); top:calc(50% + 5px); width:calc(var(--room) * .4); height:9px; }
.ph-row i:nth-child(4) { right:6px; top:calc(50% - 6px); width:40px; height:11px; }
@keyframes ph-sheen { from { background-position:100% 0; } to { background-position:0 0; } }
/* The same grey rows where a list is read with nothing held yet, in that list's geometry: 从云盘打印
   (the tile after the check's place), 分享云盘文件 (the tick, full-width dividers) and 消息 (the
   avatar, a line under each row). The two sheets' rows have nothing at the end. */
.picker-loading .ph-row { --inset:46px; --mark:40px; }
.picker-loading .ph-row + .ph-row::before { left:98px; }
.share-loading .ph-row { --inset:14px; --mark:18px; height:74px; }
.share-loading .ph-row + .ph-row::before { left:0; }
.picker-loading .ph-row i:nth-child(4),.share-loading .ph-row i:nth-child(4) { display:none; }
.chat-loading .ph-row { --inset:12px; --mark:40px; height:65px; border-bottom:1px solid var(--line); }
.chat-loading .ph-row + .ph-row::before { content:none; }
/* ListMotion on 最近打印: a new row's light accent and a failed one's red fade from the row; a
   finished one has a soft band cross it once, behind its content (jobs-view.mjs). */
.job-row.is-new { animation:row-tint-new 600ms cubic-bezier(0,0,.2,1); }
.job-row.is-fail-flash { animation:row-tint-fail 600ms cubic-bezier(0,0,.2,1); }
@keyframes row-tint-new { from { background-color:#d9e0d5; background-color:color-mix(in srgb,var(--sage) 14%,var(--soft)); } }
@keyframes row-tint-fail { from { background-color:#f6e3df; } }
/* 云盘 the same way (CloudScreen.updateInPlace, NEW_FILE_MS): a new file's row grows in with the
   accent; a gone one folds away over the list, which is positioned for it (cloud-view.mjs);
   从云盘打印's 删除 folds its rows the same way (app.mjs pickerRemoved). */
.cloud-row.is-new { animation:row-tint-new 600ms cubic-bezier(0,0,.2,1); }
#cloudList .cloud-card, #pickerList .cloud-card { position:relative; }
.row-sweep { position:absolute; z-index:-1; top:0; bottom:0; left:0; width:55%; pointer-events:none;
  background:linear-gradient(90deg,transparent,#e0e6da,transparent); background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--sage) 7%,var(--soft)),transparent); }
.job-row .job-mark.is-quiet { color:var(--muted); }
.job-empty { display:grid; gap:4px; padding:22px 18px; }
.job-empty small { color:var(--muted); }
.menu-item { display:block; width:100%; min-height:52px; text-align:left; padding:0 6px; font-size:16px; border-radius:10px; }
.menu-item + .menu-item { border-top:1px solid var(--line); border-radius:0; }
.sheet-title { font-size:17px; margin:0 6px 8px; overflow-wrap:anywhere; }
.pre-line { white-space:pre-line; }
#confirmMessage { white-space:pre-line; }
.wide-button { width:100%; margin-top:12px; }
#overrideList .row span { flex:1; }

/* Print sheet (Android PrintSheet): the paper, two chips that open one tray at a time, and a
   footer with the pager, 同时保存到云盘 / 仅保存, the 份数 stepper and 取消 | 打印 (1 : 3). */
.print-sheet h2 { font-size:22px; color:var(--ink); }
.sheet-file { display:block; font-size:13px; color:var(--muted); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin:2px 0 8px; }
.paper-box { height:clamp(260px,48dvh,440px); padding:8px; border-radius:12px; background:var(--sunken); display:grid; place-items:center; color:var(--muted); font-size:13px; cursor:zoom-in; overflow:hidden; }
.paper-box canvas { max-width:100%; max-height:100%; width:auto; height:auto; background:#fff; box-shadow:0 1px 6px #20251f22; }
.chips { display:grid; gap:6px; margin:12px 0 0; }
/* PrintSheet.settingsChip: a long printer name wraps, up to three lines. */
.chip { min-height:48px; max-height:calc(4.2em + 22px); padding:10px 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--ink); font-size:13px; line-height:1.4; text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; overflow:hidden; }
.chip.is-open { background:var(--soft); border-color:transparent; color:var(--sage); font-weight:650; }
.tray { display:grid; gap:14px; margin-top:8px; padding:14px; border-radius:16px; background:var(--sunken); }
.tray-hint:empty { display:none; }
.tray-hint { font-size:13px; color:var(--muted); margin:0; }
.field-note { color:var(--muted); font-size:12px; }
.segmented .segment { position:relative; z-index:1; flex:1; min-height:42px; border-radius:9px; color:var(--ink); font-size:15px; }
.segmented .segment[aria-checked="true"] { color:var(--sage); font-weight:650; }
/* The highlight is one marker that slides under the checked segment in 220 ms (PrintSheet's
   ControlMotion.Highlight, SLIDE_MS; placed by motion.mjs bindSegmentMotion), not a fill per segment. */
.segmented .segment-marker { position:absolute; z-index:0; top:0; left:0; border-radius:9px; background:var(--soft); transition:transform 220ms var(--motion-ease); pointer-events:none; }
.choice-list { display:grid; border:1px solid var(--line); border-radius:12px; background:var(--surface); overflow:hidden; }
.choice-list .choice { min-height:52px; padding:10px 14px 10px 40px; position:relative; text-align:left; border-radius:0; color:var(--ink); font-size:15px; }
.choice-list .choice + .choice { border-top:1px solid var(--line); }
.choice-list .choice::before { content:""; position:absolute; left:14px; top:50%; width:16px; height:16px; margin-top:-8px; border-radius:50%; border:1.5px solid var(--muted); transition:border-width 180ms var(--motion-ease); }
.choice-list .choice[aria-checked="true"] { color:var(--sage); font-weight:650; }
.choice-list .choice[aria-checked="true"]::before { border:5px solid var(--sage); }
.printer-single { margin:0; font-size:15px; }
.sheet-footer { position:sticky; bottom:0; z-index:2; margin:14px calc(-1 * var(--sheet-pad,20px)) calc(-1 * max(22px,env(safe-area-inset-bottom))); padding:8px 16px max(12px,env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--surface); display:grid; gap:6px; }
.sheet-footer .pager { justify-content:space-between; font-size:13px; }
.sheet-footer #page { white-space:pre-line; text-align:center; color:var(--muted); }
.save-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.copies-row { display:flex; align-items:center; gap:8px; }
.copies-row > span { flex:1; font-size:15px; }
.stepper { width:44px; font-size:22px; color:var(--sage); background:var(--soft); }
.copies-row input { width:48px; height:44px; text-align:center; padding:0; font-variant-numeric:tabular-nums; }
.copies-row input.is-invalid { border-color:var(--err); }
.sheet-actions { display:grid; grid-template-columns:1fr 3fr; gap:12px; }
.sheet-actions .primary { min-height:48px; }
.batch-bar { margin:0 0 8px; }
.batch-title { margin:0 0 6px; font-size:13px; font-weight:700; color:var(--sage); }
/* PrintBatch.addBatchPreviewHeader: each file its own bordered card, 6 px apart; the open one
   in the accent (border, a filled number, its name in bold), a done one green and struck through. */
.batch-rows { max-height:108px; overflow:auto; display:grid; gap:6px; align-content:start; }
.batch-row { display:grid; grid-template-columns:24px minmax(0,1fr) 142px; align-items:center; gap:8px; width:100%; min-height:48px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); text-align:left; font-size:13px; transition:background-color 180ms var(--motion-ease), border-color 180ms var(--motion-ease), transform 120ms var(--motion-ease); }
.batch-row:disabled { opacity:1; }
.batch-row.is-current { background:var(--soft); border-color:var(--sage); }
.batch-index { width:22px; height:22px; border-radius:11px; background:var(--sunken); color:var(--muted); display:grid; place-items:center; font-size:11px; font-weight:700; }
.batch-row.is-current .batch-index { background:var(--sage); color:#fff; }
.batch-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--muted); }
.batch-row.is-current .batch-name { color:var(--sage); font-weight:700; }
.batch-row.is-skipped .batch-name { text-decoration:line-through; color:var(--sage); }
.batch-state { color:var(--muted); text-align:right; font-size:11px; font-weight:700; }
.batch-row.is-done .batch-state { color:var(--sage); }
@media (prefers-reduced-motion: reduce) { .batch-row { transition:none; } }
.zoom-hint { font-size:13px; color:var(--muted); margin:0 0 8px; }
/* The older pager and batch rules use larger glyph buttons and a row layout; the sheet's own win. */
.sheet-footer .pager button, #zoomDialog .pager button { min-width:0; font-size:14px; }
#batchBar { display:block; margin:0 0 8px; }
/* Sheet and dialog buttons (Android confirmSheet / stackWhenCrowded): 取消 | action at 1 : 1,
   10 px apart, 48 px high; a label that would not fit makes the row stack, in the same order. */
.sheet-buttons { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.sheet-buttons > button { flex:1 1 0; min-width:max-content; min-height:48px; padding:10px 14px; margin:0; }
.sheet-buttons > button[hidden] { display:none; }
#confirmAction .primary.danger { background:#f9e6e2; color:var(--err); }
/* Centred dialogs (Android IvoryDialogBuilder): 20 px corners, at most 520 px wide (compact: 340 px),
   never closer than 16 px to the screen's edges, centred in what the keyboard leaves. */
dialog.center-dialog { top:var(--viewport-top,0px); bottom:var(--viewport-bottom,0px); margin:auto; height:fit-content;
  width:min(calc(100% - 32px),520px); max-height:min(85dvh,calc(var(--viewport-height,100dvh) - 32px));
  border-radius:20px; padding:22px 22px 18px; }
dialog.compact-dialog { width:min(calc(100% - 32px),340px); border-radius:16px; }
.center-dialog h2 { font-size:20px; color:var(--ink); margin:0 0 8px; }
.compact-dialog h2 { font-size:18px; }
.center-dialog p { font-size:14px; }
.list-dialog { padding:8px; }
.list-dialog .sheet-title { margin:10px 14px 6px; font-size:16px; }
.list-dialog .menu-item { padding:0 14px; }
.dialog-caption { font-size:12px; color:var(--muted); margin:0 0 10px; }
.choice-body { display:grid; max-height:min(50dvh,380px); overflow:auto; overscroll-behavior:contain; }
.choice-body .radio-list { display:grid; }
.radio-row,.check-row { display:flex; align-items:center; gap:12px; min-height:48px; font-size:14px; color:var(--ink); }
.radio-row input[type="radio"],.check-row input[type="checkbox"] { -webkit-appearance:auto; appearance:auto; flex:none; width:20px; height:20px; padding:0; margin:0; accent-color:var(--sage); }
.radio-row.is-disabled { color:var(--muted); }
.mode-list { margin-top:6px; padding-top:8px; border-top:1px solid var(--line); }
.mode-list .field-label { margin:0 0 2px; }
.restore-all { justify-self:start; padding:0 4px; }
.dialog-error { color:var(--err); font-size:13px; margin:6px 0 0; }
.dialog-error:empty { display:none; }
.choice-body .copies-row { margin:6px 0; }
.busy-dialog { width:min(calc(100% - 48px),300px); text-align:center; }
.busy-label { font-size:15px; color:var(--ink)!important; margin:4px 0 14px; font-variant-numeric:tabular-nums; }
.busy-dialog .task-bar { height:6px; }
.busy-dialog .task-bar i { transition:width 300ms var(--motion-ease); }
.busy-dialog .sheet-buttons { margin-top:18px; }
/* 正在上传 (MainActivity.showBusy, DOCUMENT): the paper motion above the words, as the submit wait. */
#uploadSheet .motion { width:52px; height:52px; margin:2px auto 12px; border-radius:16px; }
/* IvoryActivity.confirmSheet: from the bottom, its handle, the title (19 px), the line under it
   (14 px, 8 px below) and 取消 | the action 20 px below; it drags down by the handle and title. */
#confirmSheet > .head { position:static; padding:0; }
#confirmSheet .head h2 { margin:6px 0 0; font-size:19px; color:var(--ink); }
#confirmSheetMessage { margin:8px 0 0; font-size:14px; white-space:pre-line; overflow-wrap:anywhere; }
#confirmSheet .sheet-buttons { margin-top:20px; }
/* Popup menu (Android IvoryMenu): under its ⋯, right-aligned, 176 px wide at least, 48 px rows,
   danger items last below a divider. */
.menu-layer { position:fixed; inset:0; z-index:55; }
.popup-menu { position:absolute; min-width:176px; max-width:calc(100vw - 16px); padding:6px; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:0 8px 24px #20251f29; }
.menu-row { display:flex; align-items:center; gap:12px; width:100%; min-height:48px; padding:0 12px; font-size:15px; border-radius:10px; text-align:left; color:var(--ink); white-space:nowrap; }
.menu-row .icon { width:18px; height:18px; color:var(--muted); }
.menu-row.danger-text,.menu-row.danger-text .icon { color:var(--err); }
.menu-divider { height:1px; margin:6px 4px; background:var(--line); }
/* Snackbar (Android IvorySnackbar): near the bottom, above the tab bar or the composer. */
/* A light surface sized to its text, a tone mark in front: a white check on the accent for a
   success, the info mark, an amber or red alert on a tinted surface for a warning or an error. */
.snackbar { position:fixed; z-index:60; left:0; right:0; width:fit-content; max-width:min(560px,calc(100% - 24px)); margin:0 auto; display:flex; align-items:center; gap:10px;
  min-height:48px; padding:9px 12px; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); font-size:14px; box-shadow:0 4px 14px #20251f24; }
.snackbar-text { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.snackbar-icon { flex:none; display:grid; place-items:center; width:24px; height:24px; border-radius:12px; color:var(--muted); }
.snackbar-icon .icon { width:22px; height:22px; }
.snackbar-icon .icon.is-info { transform:rotate(180deg); }
.snackbar.is-success { background:var(--soft); border-color:var(--soft); }
.snackbar.is-success .snackbar-icon { background:var(--sage); color:#fff; }
.snackbar.is-success .snackbar-icon .icon { width:16px; height:16px; }
.snackbar.is-warning { background:#fcf7ea; border-color:#e9dbba; }
.snackbar.is-warning .snackbar-icon { color:var(--amber); }
.snackbar.is-error { background:#fef3f0; border-color:#f1cdc6; }
.snackbar.is-error .snackbar-icon { color:var(--err); }
.snackbar { pointer-events:none; }
.snackbar-action { pointer-events:auto; flex:none; max-width:132px; min-height:44px; padding:6px 12px; border-radius:12px; background:var(--soft); color:var(--sage); font-size:13px; font-weight:700; }
.snackbar.is-warning .snackbar-action { color:var(--amber); }
.snackbar.is-error .snackbar-action { background:#f9e4df; color:var(--err); }
/* In a conversation it sits on the thread, which follows the visible viewport, so the keyboard never covers it. */
#thread > .snackbar { position:absolute; }
/* 云盘 (Android CloudScreen). */
.usage-line { display:flex; align-items:center; gap:12px; margin:0 0 12px; }
#cloudUsage { min-width:0; min-height:1.5em; font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.usage-bar { flex:1; min-width:24px; height:3px; border-radius:2px; background:var(--sunken); overflow:hidden; }
.usage-bar i { display:block; width:0; height:100%; background:var(--sage); transition:width 450ms var(--motion-ease); }
/* 公共文件 for those who do not manage them: 共 N 个文件 only; the bar keeps its place, unseen. */
.usage-line.is-count .usage-bar { visibility:hidden; }
/* 我的文件 | 公共文件 (云盘 and 从云盘打印): the print sheet's segmented control. The dot for files
   added to 公共文件 sits just after its label, out of the flow, so no label moves when it comes. */
.cloud-scope { width:fit-content; max-width:100%; gap:8px; margin:0 0 12px; }
.cloud-scope .segment { flex:0 1 auto; min-width:96px; min-height:38px; padding:0 12px; font-size:13px; white-space:nowrap; }
.cloud-scope .scope-dot { position:absolute; top:50%; left:calc(50% + 2em + 4px); width:7px; height:7px; margin-top:-3.5px; border-radius:50%; background:var(--sage); }
/* 公共文件分类 (云盘 and 从云盘打印): one row of light pills under the switch (.chip-action, as the chat's),
   scrolling sideways with no scrollbar, one fixed height whatever loads; the chosen pill takes the
   segmented control's checked colours. The weight never changes, so no pill moves when chosen. */
.category-pills { display:flex; align-items:center; gap:8px; height:36px; margin:0 0 12px; overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain; scrollbar-width:none; }
.category-pills::-webkit-scrollbar { display:none; }
.category-pills .chip-action { flex:none; height:34px; min-height:0; padding:0 14px; border-radius:17px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font-size:13px; white-space:nowrap; }
.category-pills .chip-action[aria-pressed="true"] { background:var(--soft); border-color:transparent; color:var(--sage); }
.category-pills .category-manage { flex:none; min-height:34px; height:34px; padding:0 8px; font-size:13px; white-space:nowrap; }
/* 管理分类 (设置's small dialog): each category's name over 改名 · 删除 · 上移 · 下移, four equal parts
   so a button reading 正在移动… keeps its place; 改名 and 新建分类 open a field in place. */
.category-list { display:grid; }
.category-item { display:grid; gap:2px; padding:8px 0; border-bottom:1px solid var(--line); }
.category-item-name { font-size:15px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.category-item-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; }
.category-item-actions .text-action { min-height:36px; padding:0 2px; font-size:13px; white-space:nowrap; }
.category-empty { margin:4px 0 8px; font-size:14px; color:var(--muted); }
.category-foot { display:grid; gap:4px; padding-top:10px; }
.category-editor { display:grid; gap:6px; }
.category-editor .rename-field { margin:0; }
.category-editor-buttons { display:flex; gap:8px; }
.category-editor-buttons > button { flex:1 1 0; min-height:40px; padding:6px 10px; }
.category-add { min-height:44px; }
/* The location line (公共文件 breadcrumb above the list): horizontally scrollable ancestor path
   with 新建文件夹 pinned at the right for admins; one fixed height whenever shown. */
.category-location { display:flex; align-items:center; gap:6px; height:36px; margin:0 0 8px; min-width:0; overflow:hidden; font-size:14px; color:var(--muted); }
.category-trail { flex:1 1 auto; display:flex; align-items:center; gap:2px; min-width:0; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
.category-trail::-webkit-scrollbar { display:none; }
.category-location .text-action { flex:none; height:36px; min-height:0; padding:0 6px; white-space:nowrap; font-size:14px; }
.category-location .category-up { margin-left:-6px; }
.category-location .category-create { flex:none; margin-left:auto; margin-right:-6px; }
.category-separator { flex:none; padding:0 2px; color:var(--muted); }
.category-here { flex:none; white-space:nowrap; color:var(--ink); }
/* A folder's row is a file row with the folder glyph in the type tile; its box never shows (folders
   are never chosen), keeping the tiles in line while selecting. */
.cloud-row.is-folder .cloud-check { visibility:hidden; }
.ext-tile.is-folder .icon { width:22px; height:22px; }
/* 移动到…: recursive indented folder tree rows using --depth. */
.radio-row.is-nested { padding-left:calc(14px + var(--depth, 1) * 18px); }
/* 重命名: the name without its extension, the extension fixed after it. */
.rename-field { display:flex; align-items:center; gap:6px; margin:4px 0 0; }
.rename-field input { flex:1; }
.rename-ext { flex:none; max-width:40%; font-size:16px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* A menu item that cannot be used says why under its label. */
.menu-copy { display:grid; gap:2px; max-width:15em; white-space:normal; }
.menu-note { font-size:12px; line-height:1.35; color:var(--muted); }
.menu-row:has(.menu-note) { padding-top:8px; padding-bottom:8px; }
.search-field { position:relative; display:block; margin:0 0 12px; }
.search-field > .icon { position:absolute; left:12px; top:13px; width:18px; height:18px; color:var(--muted); pointer-events:none; }
.search-field input { padding-left:38px; }
/* A hidden upload's progress ends the usage line (the bar gives way), so the list never moves. */
.upload-status { flex:none; font-size:12px; color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.upload-status:empty { display:none; }
#cloudList { padding-bottom:84px; }
.cloud-card { border:1px solid var(--line); border-radius:16px; background:var(--surface); overflow:hidden; }
.cloud-row { position:relative; display:flex; align-items:center; min-height:64px; padding-right:2px; transition:background-color 180ms var(--motion-ease); }
.cloud-row + .cloud-row::before { content:""; position:absolute; top:0; left:66px; right:0; height:1px; background:var(--line); }
/* A chosen row as on the desktop's 从云盘选择: a light accent tint (Android: the soft accent 35 % toward
   the surface) with a 3 px accent edge, and a filled box whose tick springs in. */
.cloud-row.is-chosen { background:var(--soft); background:color-mix(in srgb,var(--soft) 65%,var(--surface)); box-shadow:inset 3px 0 0 var(--sage); }
.cloud-main { flex:1; min-width:0; display:flex; align-items:center; gap:12px; min-height:64px; padding:6px 4px 6px 14px; border-radius:0; text-align:left; color:var(--ink); -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.cloud-check { display:none; place-items:center; flex:none; width:20px; height:20px; border:2px solid var(--muted); border-radius:6px; background:var(--surface);
  transition:background-color 120ms ease,border-color 120ms ease; }
.is-selecting .cloud-check { display:grid; }
.cloud-check .icon { width:14px; height:14px; color:#fff; transform:scale(0); opacity:0; transition:transform 220ms cubic-bezier(.3,1.2,.5,1),opacity 120ms ease; }
.is-chosen .cloud-check { background:var(--sage); border-color:var(--sage); }
.is-chosen .cloud-check .icon { transform:scale(1); opacity:1; }
@media (prefers-reduced-motion:reduce) { .cloud-check,.cloud-check .icon { transition:none; } }
.ext-tile { flex:none; width:40px; height:40px; display:grid; place-items:center; border-radius:10px; background:var(--soft); color:var(--sage); font:700 10px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:.02em; }
.cloud-copy { flex:1; min-width:0; display:grid; gap:3px; }
.cloud-name { display:flex; min-width:0; font-size:15px; font-weight:500; }
.name-head { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.name-tail { flex:none; white-space:nowrap; }
.cloud-copy small { font-size:12px; color:var(--muted); }
.cloud-copy small.is-error { color:var(--err); }
.ext-tile.is-long { font-size:8px; letter-spacing:0; overflow:hidden; }
/* Selecting: the row actions fade away in 120 ms and back in 180 ms (CloudScreen.paintRow). */
.cloud-print,.cloud-more { flex:none; width:44px; height:48px; color:var(--ink); transition:opacity 180ms var(--motion-ease),transform 120ms var(--motion-ease); }
.is-selecting .cloud-print,.is-selecting .cloud-more { opacity:0; visibility:hidden; transition:opacity 120ms var(--motion-ease),visibility 0s 120ms; }
.cloud-loading .ph-row::before { content:none; }
.empty-card { min-height:180px; display:grid; align-content:center; gap:8px; }
.empty-card h3 { font-size:20px; }
.card.empty-card p { margin:0; font-size:14px; }
.empty-match { padding:32px 0; text-align:center; font-size:14px; color:var(--muted); }
.upload-fab { position:fixed; z-index:4; left:0; top:0; display:flex; align-items:center; gap:8px; height:52px; padding:0 20px 0 16px; border-radius:16px;
  background:var(--soft); background:color-mix(in srgb,var(--soft) 65%,var(--surface)); color:var(--btn-primary-ink);
  font-size:15px; font-weight:700; box-shadow:0 6px 16px #20251f2e; touch-action:none; -webkit-touch-callout:none; -webkit-user-select:none; user-select:none;
  transition:background-color 180ms var(--motion-ease),box-shadow 120ms var(--motion-ease),transform 120ms var(--motion-ease),gap 150ms var(--motion-ease),padding 150ms var(--motion-ease); }
.upload-fab:not(.is-placed) { visibility:hidden; }
button.upload-fab.is-dragging:not(:disabled) { transform:scale(1.06); box-shadow:0 12px 28px #20251f40; transition:transform 120ms var(--motion-ease); }
.upload-fab.is-snapping { transition:left 220ms cubic-bezier(.22,1,.36,1),top 220ms cubic-bezier(.22,1,.36,1),transform 220ms var(--motion-ease); }
.upload-fab .icon { width:20px; height:20px; }
.upload-fab.is-compact { gap:0; padding:0 16px; }
/* The label folds away (and back) over 150 ms; the docked edge holds while the width changes. */
.upload-fab span { max-width:5em; overflow:hidden; white-space:nowrap; transition:max-width 150ms var(--motion-ease),opacity 150ms var(--motion-ease); }
.upload-fab.is-compact span { max-width:0; opacity:0; }
html[data-keyboard="true"] .upload-fab { display:none; }
/* Selecting: 已选 N 个 over the title row, the actions where the tab bar was. */
.select-bar { position:absolute; left:0; right:0; bottom:16px; z-index:1; display:flex; align-items:center; gap:6px; height:48px; background:var(--paper); }
.select-bar h2 { flex:1; min-width:0; margin-left:2px; font-size:20px; font-weight:700; }
html[data-keyboard="true"] .select-bar { bottom:8px; }
/* 云盘's 打印 | 分享 | 删除 sits in the navigation itself, exactly where its tabs are (CloudScreen puts
   its selection bar into navSlot): it covers the nav, with the nav's padding (safe area included),
   surface and top line; the tabs and their indicator hide under it once it has slid in. */
nav > .select-actions { position:absolute; inset:-1px 0 0; z-index:2; min-height:0; padding:5px max(8px,calc((100vw - 590px)/2)) max(5px,env(safe-area-inset-bottom)); }
body.is-selecting > nav > a,body.is-selecting > nav > .nav-indicator { visibility:hidden; transition:visibility 0s 240ms; }
.select-actions { position:fixed; left:0; right:0; bottom:var(--viewport-bottom,0px); z-index:5; display:flex; min-height:var(--navigation-height,64px);
  padding:0 max(8px,calc((100vw - 590px)/2)) env(safe-area-inset-bottom); background:var(--surface); border-top:1px solid var(--line); }
.select-actions button { flex:1; display:grid; justify-items:center; align-content:center; gap:4px; padding:8px 0; border-radius:12px; font-size:12px; color:var(--sage); }
.select-actions .icon { width:22px; height:22px; }
.select-actions button.danger-text { color:var(--err); }
/* 消息 (Android ChatScreen, SwipeConversationRow). */
.chat-empty,.chat-note { margin:0; padding:6px 14px; font-size:14px; color:var(--muted); }
.conv-row { position:relative; overflow:hidden; border-bottom:1px solid var(--line); }
.conv-main { position:relative; z-index:1; display:flex; align-items:center; gap:12px; width:100%; min-height:64px; padding:2px 12px; border-radius:0;
  text-align:left; background:var(--paper); color:var(--ink); touch-action:pan-y; -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.conv-row.is-pinned .conv-main { background:var(--sunken); }
.avatar { flex:none; width:40px; height:40px; display:grid; place-items:center; border-radius:50%; background:var(--soft); color:var(--sage); font-size:16px; font-weight:650; }
.avatar-small { width:36px; height:36px; font-size:15px; }
.conv-copy { flex:1; min-width:0; display:grid; gap:3px; }
.conv-top { display:flex; align-items:baseline; gap:8px; min-width:0; }
.conv-top strong,.person-name { flex:1; min-width:0; font-size:16px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-time { flex:none; font-size:12px; color:var(--muted); }
.peer-preview { display:block; font-size:13px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.peer-preview:empty { display:none; }
.unread-badge { flex:none; min-width:20px; height:20px; padding:0 6px; border-radius:10px; background:var(--sage); color:#fff; font:700 11px/20px sans-serif; text-align:center; }
/* The unread count ends the preview's line (ChatScreen.personRow), 8 px after it. */
.conv-line { display:flex; align-items:center; gap:8px; min-width:0; }
.conv-line .peer-preview { flex:1; min-width:0; }
.swipe-actions { position:absolute; top:0; right:0; bottom:0; width:160px; display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:0 8px; }
.swipe-actions button { width:68px; min-height:56px; display:grid; justify-items:center; align-content:center; gap:2px; border-radius:12px; font-size:12px; }
.swipe-actions .icon { width:22px; height:22px; }
.swipe-pin { background:var(--soft); color:var(--sage); }
.swipe-delete { background:#f8e8e3; color:var(--err); }
.person-row { display:flex; align-items:center; gap:12px; min-height:64px; padding:2px 12px; border-radius:0; background:transparent; }
#thread header { gap:6px; padding:8px 6px; padding-top:max(8px,env(safe-area-inset-top)); }
.thread-back { width:48px; height:48px; }
.thread-title { flex:1; min-width:0; display:grid; }
#peerName { font-size:17px; line-height:1.3; }
#peerHandle { font-size:12px; color:var(--muted); }
.bubble { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.chat-file { display:flex; align-items:center; gap:4px; }
.chat-file-copy { flex:1; min-width:0; }
.chat-file-copy strong { overflow-wrap:anywhere; }
/* A file's name: two lines at most, cut in the middle by chat-ui (fitName). */
.chat-file-name { line-height:1.35; max-height:2.7em; overflow:hidden; }
.bubble-more { width:40px; min-height:40px; margin:-6px -8px -6px 0; opacity:.7; color:var(--ink); }
.send-bar { height:3px; margin:8px 0 2px; border-radius:1.5px; background:color-mix(in srgb,var(--sage) 14%,var(--soft)); overflow:hidden; }
.send-bar i { display:block; width:0; height:100%; background:var(--sage); transition:width 300ms var(--motion-ease); }
.chat-actions { gap:8px; row-gap:6px; margin-top:6px; }
.out .chat-actions { justify-content:flex-end; }
.chat-actions .chip-action { min-height:38px; padding:8px 14px; border-radius:19px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font-size:13px; }
.chat-meta { font-size:11px; display:flex; align-items:center; max-width:100%; min-width:0; white-space:nowrap; }
/* ChatScreen.renderThread: the status 6 dp after the time; only a failure's reason is red, two lines at most. */
.chat-meta > .send-status,.chat-meta > .chat-error { margin-left:6px; }
.chat-error { min-width:0; white-space:normal; color:var(--err); overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.chat-meta .text-action { flex:none; min-height:32px; padding:0 8px; font-size:13px; }
.chat-wait .bubble { opacity:.8; color:var(--ink); font-size:16px; }
#threadNote.is-warning { padding:10px 16px; background:#faefd6; color:var(--ink); }
#composer.is-disabled > * { opacity:.45; }
#composer .iconbtn { width:48px; height:48px; }
.new-pill { position:absolute; z-index:3; left:50%; bottom:calc(var(--composer-height,64px) + 12px); transform:translateX(-50%);
  min-height:44px; padding:6px 16px; border-radius:22px; font-size:13px; box-shadow:0 4px 12px #20251f33; }
.new-pill:active:not(:disabled) { transform:translateX(-50%) scale(.97); }
/* 刷新消息 beside ⋮ (ChatScreen): the refresh mark, turning only when tapped. */
.thread-refresh { width:48px; height:48px; flex:none; }
.thread-refresh.is-loading { cursor:progress; }
/* The conversation slides in from the right and back out (ChatScreen.slideIn/leaveConversation,
   chat-ui): it neither rises nor fades as a sheet does. */
#thread { transition:none; }
#thread[open] { animation:none; }
/* 分享云盘文件: a fixed 78 % of the screen, the list taking what is left. */
#share[open] { display:flex; flex-direction:column; height:min(78dvh,calc(var(--viewport-height,100dvh) - 16px)); }
#share #shareList { flex:1; min-height:0; max-height:none; }
#share .sheet-buttons { margin-top:12px; }
/* 设置 (Android SettingsScreen): titled cards of 54 px rows, the value on the right. */
.settings-title { margin:20px 4px 6px; font-size:14px; font-weight:400; color:var(--ink); }
.settings-card { padding:0; margin:0 0 12px; border-radius:16px; }
.settings-card .setting-row,.settings-card p { margin-top:0; }
.setting-row { display:flex; align-items:center; gap:10px; width:100%; min-height:54px; padding:12px; border-radius:0; text-align:left; font-size:14px; color:var(--ink); }
.setting-row + .setting-row { border-top:1px solid var(--line); }
.setting-label { flex:1; min-width:0; }
.setting-value { max-width:58%; font-size:12px; color:var(--muted); text-align:right; overflow-wrap:anywhere; }
.setting-row > .icon { width:18px; height:18px; color:var(--muted); }
.login-devices-entry .setting-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.login-devices-entry .setting-value { flex:none; max-width:none; white-space:nowrap; }
.login-devices-entry > .icon, .login-device-item > .icon { flex:none; }
.login-devices-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.login-devices-head h2 { margin:0; font-size:17px; }
#loginDevicesDialog { width:min(calc(100% - 40px),304px); padding:8px 16px 12px; border-radius:16px; }
#loginDevicesDialog[open] { display:flex; flex-direction:column; overflow:hidden; }
#loginDevicesDialog .login-devices-head { flex:none; }
#deviceList { min-height:0; max-height:min(50dvh,var(--login-device-list-height,208px)); overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.login-device-item { min-height:50px; padding:6px 0; gap:8px; font-size:13px; }
.login-device-item + .login-device-item { border-top:1px solid var(--line); }
.login-device-copy { flex:1; min-width:0; display:grid; gap:2px; line-height:1.35; overflow-wrap:anywhere; }
.login-device-copy small { color:var(--muted); font-size:11px; }
.login-device-current { flex:none; color:var(--sage); font-size:11px; }
.login-device-revoke { flex:none; min-height:38px; font-size:11px; padding:4px 9px; border-radius:9px; }
/* 打印偏好's status sits at the end of its title line (the wrapper carries the title's margins),
   so nothing moves as it comes and goes. */
.settings-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:20px 4px 6px; }
.settings-head .settings-title { margin:0; }
.preference-status { margin:0; font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.status-card { padding:4px 8px; }
.status-row { display:flex; align-items:center; gap:12px; padding:8px; }
.status-row > .icon { width:32px; height:32px; color:var(--ink); opacity:.75; }
.status-row.is-off > .icon { opacity:.4; }
.status-copy { min-width:0; display:grid; gap:2px; }
.status-copy strong { font-size:14px; overflow-wrap:anywhere; }
.status-text { font-size:12px; }
.status-text.is-idle { color:var(--sage); }
.status-text.is-busy { color:#896c3f; }
.status-text.is-error { color:var(--err); }
.status-text.is-muted { color:var(--muted); }
.status-card .status-empty { padding:10px 8px; font-size:14px; }
.status-card .status-stale { padding:8px 8px 0; font-size:12px; color:var(--err); }
/* Screen sizes. Side insets follow the notch in landscape; narrow phones (iPhone SE, zoomed
   display) get tighter padding and type; short screens (landscape, SE) give the paper and the
   home illustration less height so the controls stay in reach. */
main,.workspace > main { padding-left:max(22px,env(safe-area-inset-left)); padding-right:max(22px,env(safe-area-inset-right)); }
/* --sheet-pad: a sheet's side padding, for what reaches its edges (the print sheet's footer). */
dialog { --sheet-pad:20px; padding-left:max(var(--sheet-pad),env(safe-area-inset-left)); padding-right:max(var(--sheet-pad),env(safe-area-inset-right)); }
dialog.center-dialog { padding-left:22px; padding-right:22px; }
dialog.list-dialog { padding:8px; }
#thread[open] { padding:0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
@media (max-width:360px) {
  main,.workspace > main { padding-left:max(16px,env(safe-area-inset-left)); padding-right:max(16px,env(safe-area-inset-right)); }
  dialog { --sheet-pad:16px; padding-left:var(--sheet-pad); padding-right:var(--sheet-pad); }
  dialog.center-dialog { padding-left:18px; padding-right:18px; }
  #downloadStatus { min-height:4.5em; }
  h1 { font-size:28px; }
  .launch { font-size:17px; min-height:68px; padding:14px 14px 14px 18px; }
  .launch > .icon:first-child { width:32px; height:32px; }
  .launch > span { margin-left:18px; }
  .chip { font-size:12px; padding:10px 12px; }
  .cloud-print,.cloud-more { width:40px; }
  .cloud-main { gap:10px; padding-left:12px; }
  .cloud-row + .cloud-row::before { left:62px; }
  nav a { font-size:12px; }
  .task-card { width:150px; }
}
@media (max-height:700px) {
  .paper-box { height:clamp(200px,42dvh,340px); }
  .task-actions button { min-height:48px; }
}
@media (max-height:500px) {
  .workspace > main > header { padding-top:max(10px,env(safe-area-inset-top)); padding-bottom:8px; }
  .workspace > main > header h1 { font-size:24px; }
  .select-bar { bottom:8px; }
  .paper-box { height:clamp(150px,55dvh,260px); }
  dialog { max-height:calc(var(--viewport-height,100dvh) - 8px); }
  dialog.center-dialog { max-height:calc(var(--viewport-height,100dvh) - 16px); }
  #share[open] { height:calc(var(--viewport-height,100dvh) - 8px); }
  .launch { min-height:60px; padding:10px 16px 10px 20px; }
  .launch > .icon:first-child { width:30px; height:30px; }
  nav a span { height:26px; }
}
/* 设置 › identity header (Android SettingsScreen): a 44 px avatar, the name, a sync line. */
.identity-row { display:flex; align-items:center; gap:12px; width:100%; padding:6px 6px 8px 2px; margin:0 0 4px; border-radius:12px; text-align:left; color:var(--ink); }
.identity-row:disabled { opacity:1; }
.identity-row > .icon { width:18px; height:18px; color:var(--muted); }
.avatar-large { width:44px; height:44px; font-size:18px; }
.identity-copy { flex:1; min-width:0; display:grid; gap:2px; }
.identity-copy strong { font-size:18px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.identity-copy small { font-size:12px; color:var(--muted); }
.setting-action { font-size:12px; color:var(--muted); }
div.setting-row { cursor:default; }
.setting-row .danger-text { color:var(--err); }
/* The account flows' dialog (SecurityFlow): title with ✕, notes, fields, busy, error, actions. */
.flow-dialog .head { margin:-4px -8px 4px 0; }
.flow-dialog .head h2 { margin:0; }
.flow-body { display:grid; gap:10px; }
.flow-note { margin:0; font-size:14px; color:var(--ink)!important; overflow-wrap:anywhere; white-space:pre-line; }
.flow-note.flow-sub,.flow-sub { color:var(--muted)!important; }
.flow-note.flow-small,.flow-small { font-size:12px; color:var(--muted)!important; }
.flow-note.flow-status { font-size:13px; color:var(--muted)!important; }
.flow-note.flow-status:empty { display:none; }
.flow-note.is-error,.flow-note.is-risk,.is-risk { color:var(--err)!important; font-weight:650; }
.flow-field { display:grid; gap:6px; font-size:13px; color:var(--muted); }
.flow-field input.is-invalid { border-color:var(--err); }
.code-input { font-size:24px!important; letter-spacing:.4em; text-align:center; font-variant-numeric:tabular-nums; height:52px!important; }
.code-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; color:var(--muted); }
.code-footer .text-action { min-height:40px; padding:0 4px; font-size:13px; }
.flow-busy { margin:10px 0 0; font-size:13px; color:var(--sage); }
/* SecurityFlow's status slot: the busy line and the error line share one line that is kept while
   empty, so starting or failing a step never changes the card's height (a long error may still
   grow it). Its lines are 14 px (.center-dialog p); it takes 12 px of the actions' top margin,
   leaving 8 px above and below the words. 是否允许此设备登录？ keeps its busy line in one too. */
.flow-status { min-height:1.5em; margin:8px 0 -12px; font-size:14px; }
.flow-status > .flow-busy,.flow-status > .dialog-error { margin:0; }
.flow-busy::before { content:""; display:inline-block; width:12px; height:12px; margin-right:8px; vertical-align:-1px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:refresh-spin .9s linear infinite; }
.flow-check { width:56px; height:56px; margin:4px auto; border-radius:50%; background:var(--soft); position:relative; }
.flow-check::after { content:""; position:absolute; left:20px; top:13px; width:12px; height:22px; border:solid var(--sage); border-width:0 3px 3px 0; transform:rotate(45deg); animation:refresh-pop .35s ease-out both; }
.key-badge { justify-self:start; padding:4px 10px; border-radius:12px; background:var(--soft); color:var(--sage); font-size:12px; font-weight:700; }
.key-badge.is-locked,.recover-badge { background:#f9e6e2; color:var(--err); }
.recover-badge { display:inline-block; padding:4px 10px; border-radius:12px; font-size:12px; font-weight:700; }
#recover { display:grid; gap:10px; margin:12px 0; }
#recover:not([hidden]) { display:grid; }
.flow-body .wide-button { margin-top:0; }
.switch-row { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; font-size:15px; color:var(--ink); }
.switch-row input[type="checkbox"] { -webkit-appearance:none; appearance:none; flex:none; width:50px; height:30px; padding:0; margin:0; border:0; border-radius:15px; background:var(--line); position:relative; cursor:pointer; transition:background-color 180ms var(--motion-ease); }
.switch-row input[type="checkbox"]::after { content:""; position:absolute; top:3px; left:3px; width:24px; height:24px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #20251f40; transition:transform 180ms var(--motion-ease); }
.switch-row input[type="checkbox"]:checked { background:var(--sage); }
.switch-row input[type="checkbox"]:checked::after { transform:translateX(20px); }
.soft.danger-soft { background:#f5e3de; color:#8f3527; }
/* 是否允许此设备登录？ */
.approval-dialog h2 { margin-bottom:4px; }
.device-card { display:flex; align-items:center; gap:12px; margin:14px 0 8px; padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--sunken); }
.device-card .icon { width:28px; height:28px; color:var(--sage); }
.device-card span { display:grid; gap:2px; min-width:0; }
.device-card strong { overflow-wrap:anywhere; }
.device-card small { font-size:12px; color:var(--muted); }
/* Account overview and 退出登录 (stacked, 确认退出 first). */
.account-sheet .settings-card { margin-bottom:8px; }
.account-sheet .settings-title { margin-top:12px; }
.stacked-buttons { display:grid; gap:8px; margin-top:18px; }
.stacked-buttons button { width:100%; min-height:48px; }
.danger-fill { background:#f9e6e2; color:var(--err); font-weight:700; }
#appearanceSheet #appearance { display:block; }
/* 系统邮件 in the header, between print status and 刷新 (Android MainActivity). */
.mail-button { position:relative; flex:none; width:44px; height:44px; overflow:visible; }
.mail-count { position:absolute; top:2px; right:0; min-width:18px; height:18px; padding:0 4px; border-radius:9px; background:var(--sage); color:#fff; font:700 10px/18px sans-serif; font-style:normal; text-align:center; }
.mail-row { display:grid; gap:4px; width:100%; padding:14px 8px; border-radius:0; border-bottom:1px solid var(--line); text-align:left; color:var(--ink); }
.mail-row strong { font-size:15px; }
.mail-snippet { font-size:13px; color:var(--muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.mail-time { font-size:11px; color:var(--muted); }
.mail-title { font-size:21px; margin:0; }
/* A message's actions (SecurityMail.detail): 返回 | 删除邮件 on one row, 修改密码 across under them. */
#mailActions > .mail-wide { flex:1 1 100%; }
/* SecurityMail.frame: 关闭 as a text button at the heading's end, in place of ✕. */
#mailDialog .head .mail-close { flex:none; min-height:40px; margin-right:8px; padding:8px 14px; font-size:14px; }
/* Double-sided preview (shared/print-preview/render.mjs): front and back of one sheet side by
   side, 背面留白 when the sheet has no back page, the flip edge below. */
.paper-box .spread { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:minmax(0,1fr) auto; gap:6px 14px; width:100%; height:100%; }
.spread .face { min-width:0; min-height:0; margin:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; }
.spread .face canvas,.spread .blank-page { max-width:100%; max-height:calc(100% - 20px); width:auto; height:auto; background:#fff; box-shadow:0 1px 6px #20251f22; }
.spread .blank-page { width:100%; }
.spread figcaption { font-size:12px; color:var(--muted); }
.spread-edge { grid-column:1 / -1; margin:0; text-align:center; font-size:12px; color:var(--muted); }
.paper-wait { display:grid; justify-items:center; gap:10px; }
.paper-wait button { min-height:40px; padding:6px 16px; }
/* 从云盘打印: tap files to choose them (several make one batch), then 打印. */
#picker[open] { display:flex; flex-direction:column; overflow:hidden; }
#picker > * { flex:none; }
#picker > p#pickerHint { margin:0 0 12px; font-size:14px; }
.picker-list { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }
.picker-list .cloud-main:disabled { opacity:1; }
.picker-list .cloud-main:disabled .cloud-check { border-color:var(--line); }
.picker-list .cloud-main:disabled .ext-tile, .picker-list .cloud-main:disabled .cloud-name { opacity:.5; }
.picker-list .cloud-row + .cloud-row::before { left:98px; }
.picker-empty { padding:40px 0 24px; text-align:center; font-size:14px; color:var(--muted); }
.picker-select h2 { flex:1; min-width:0; color:var(--ink); font-size:20px; font-weight:700; }
#picker .select-actions { position:static; z-index:auto; min-height:64px; margin-top:8px; padding:0; background:var(--surface); }
/* Launch screen: from the first paint until the sign-in or the workspace is ready. The icon sits
   where the home-screen app's splash (apple-touch-startup-image) put it; a bar moves below. */
.launch-screen { position:fixed; inset:0; z-index:100; display:grid; place-items:center; background:var(--paper); transition:opacity 240ms var(--motion-ease); }
.launch-screen.is-gone { opacity:0; pointer-events:none; }
/* Back over the workspace after a sign-in (boot.mjs holdLaunch): taking taps, seen after 1.2 s. */
.launch-screen.is-held { opacity:0; }
.launch-mark { position:relative; width:96px; height:96px; }
.launch-mark img { display:block; width:96px; height:96px; border-radius:22px; }
.launch-below { position:absolute; top:100%; left:50%; width:max-content; max-width:80vw; transform:translateX(-50%); display:grid; justify-items:center; gap:14px; padding-top:16px; }
.launch-name { font-size:17px; font-weight:650; color:var(--ink); }
.launch-bar { position:relative; width:120px; height:3px; border-radius:2px; background:var(--sunken); overflow:hidden; }
.launch-bar i { position:absolute; top:0; bottom:0; left:0; width:40%; border-radius:2px; background:var(--sage); animation:launch-bar 1.1s ease-in-out infinite; }
@keyframes launch-bar { from { transform:translateX(-100%); } to { transform:translateX(250%); } }
@media (prefers-reduced-motion:reduce) { .launch-bar i { animation:none; width:100%; opacity:.4; } .launch-screen { transition:none; } }
.launch-slow { font-size:13px; color:var(--muted); text-align:center; }
body.is-launching > main#entry { visibility:hidden; }
/* 云盘 list (CloudScreen): rows straight on the page, no card; every row, the last too, has a divider
   from 52 px (after the type tile); the picker keeps its card. */
#cloudList .cloud-card { border:0; border-radius:0; background:transparent; overflow:visible; }
#cloudList .cloud-main { padding-left:0; }
#cloudList .cloud-row + .cloud-row::before { content:none; }
#cloudList .cloud-row::after { content:""; position:absolute; bottom:0; left:52px; right:0; height:1px; background:var(--line); }
#cloudList .is-selecting .cloud-row::after { left:84px; }
/* 消息 alignment (round 10) */
/* The people search: × (关闭搜索) inside the field while the directory shows; no second native clear. */
.search-field .search-close { position:absolute; top:50%; right:2px; width:44px; height:44px; transform:translateY(-50%); color:var(--muted); }
.search-field .search-close:active:not(:disabled) { transform:translateY(-50%) scale(.96); }
.search-field.is-browsing input { padding-right:48px; }
#peopleSearch::-webkit-search-cancel-button { -webkit-appearance:none; appearance:none; display:none; }
.chat-unavailable { margin-top:4px; text-align:center; }
/* The thread: the amber strip under the header, the empty note, muted unreadable messages. */
#threadNote { font-size:13px; line-height:1.5; border-bottom:1px solid var(--line); }
.thread-back .icon { width:26px; height:26px; }
.thread-empty { margin:0; padding:16px 4px; text-align:center; font-size:14px; color:var(--muted); }
.bubble.is-unreadable { color:var(--muted); }
/* File cards (ChatScreen.fileBubble): the file icon, name and size; a gone file keeps its card. */
.chat-file-card { min-width:min(260px,100%); max-width:86%; padding-right:6px; }
.chat-file { gap:10px; }
.chat-file-icon { width:26px; height:26px; flex:none; color:var(--sage); }
.chat-file-copy small { margin-top:2px; font-size:12px; color:var(--muted); }
.chat-image { border-radius:10px; color:var(--muted); font-size:13px; }
/* 存入云盘 progress in a conversation. */
#chatBusy .busy-label { margin-bottom:14px; }
/* 分享云盘文件: the hint takes a second line; plain notes and the files under review. */
#shareHint { white-space:pre-line; }
.share-empty { margin:0; padding:14px 4px; font-size:14px; color:var(--muted); }
.share-file { margin:0; padding:12px 4px; font-size:15px; color:var(--ink); border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.share-retry { margin-top:8px; }
/* 全局 alignment (round 10) */
/* Header title (MainActivity): 30 px on 打印, 26 px on the other pages, made smaller to fit
   (down to 16 px, in app.mjs fitTitle) instead of cut with an ellipsis. */
.workspace > main > header > h1 { font-size:26px; text-overflow:clip; }
.workspace > main > header > h1.is-home { font-size:30px; }
html[data-keyboard="true"] .workspace > main > header > h1 { font-size:24px; }
@media (max-height:500px) { .workspace > main > header > h1, .workspace > main > header > h1.is-home { font-size:24px; } }
/* An open dialog keeps no transform once it has entered, so a snackbar inside it is placed
   against the screen (above the tab bar's place), not against the dialog's own box. */
dialog[open] { transform:none; }
/* Sheets drag down by their handle and title row (IvoryMotion.dragToDismiss); the handle gets
   a finger-sized target, the dim thins as the sheet goes. A batch's print sheet has no handle. */
dialog[data-draggable] > .handle,dialog[data-draggable] > .head { touch-action:none; }
dialog[data-draggable] > .handle { position:relative; cursor:grab; }
dialog[data-draggable] > .handle::before { content:""; position:absolute; inset:-12px -56px -10px; }
dialog.is-dragging { -webkit-user-select:none; user-select:none; }
dialog.is-dragging::backdrop { opacity:var(--drag-dim,1); transition:none; }
#sheet:has(#batchBar:not([hidden])) > .handle { display:none; }
/* 打印任务 as Android's centred card (TaskProgress): the body scrolls, the two actions stay. */
#taskSheet.center-dialog { width:min(calc(100% - 32px),540px); padding:0; overflow:hidden; }
#taskSheet[open] { display:flex; flex-direction:column; }
.task-body { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; padding:18px 18px 0; }
#taskSheet .task-actions,.task-ghost .task-actions { flex:none; margin:0; padding:8px 18px 16px; }
.task-actions button { font-size:13px; overflow-wrap:anywhere; }
.task-head { display:flex; align-items:center; gap:10px; }
.task-sheet h2,.task-ghost h2 { margin:0; font-size:24px; color:var(--ink); }
.task-alert { flex:none; display:grid; place-items:center; width:40px; height:40px; color:var(--err); }
.task-alert .icon { width:34px; height:34px; }
.task-rows p { margin:0 0 2px; font-size:12px; color:var(--muted); }
.task-notes p.is-quiet { margin-top:4px; }
/* PaperFeedView: the output slot, a sheet whose lines roll while printing, the tray with the
   copies already out, and beside it the percentage (36 px) and 已完成 N / M 份. */
.paper-feed { display:flex; align-items:flex-start; min-height:104px; margin:4px 0 2px; }
.feed-art { position:relative; flex:none; width:132px; height:104px; }
.feed-slot { position:absolute; left:4px; top:0; z-index:1; width:108px; height:14px; border-radius:7px; background:var(--ink); opacity:.82; }
.feed-slot::after { content:""; position:absolute; left:16px; right:16px; top:9px; height:2px; background:var(--paper); opacity:.6; }
.feed-sheet { position:absolute; left:23px; top:11px; z-index:2; width:70px; height:70px; border:1px solid var(--line); border-radius:3px; background:var(--surface); }
.feed-clip { position:absolute; inset:4px 2px 3px; overflow:hidden; }
.feed-lines { position:absolute; left:8px; top:-40px; display:grid; gap:6px; }
.feed-lines i { display:block; width:50px; height:3px; border-radius:1.5px; background:var(--muted); opacity:.37; }
.feed-lines i.p0 { width:43px; background:var(--sage); opacity:.49; }
.feed-lines i.p3 { width:55px; }
.paper-feed.is-printing .feed-lines,.paper-feed.is-finishing .feed-lines { animation:feed-roll 720ms linear infinite; }
@keyframes feed-roll { to { transform:translateY(45px); } }
.feed-tray { position:absolute; left:10px; top:96px; width:96px; height:7px; border:1.5px solid var(--line); border-top:0; border-radius:0 0 3px 3px; }
.feed-stack i { position:absolute; left:12px; bottom:2px; width:66px; height:5px; border:1px solid var(--line); border-radius:2px; background:var(--surface); }
.feed-stack i:nth-child(2) { left:13px; bottom:4px; }
.feed-stack i:nth-child(3) { left:14px; bottom:6px; }
.feed-stack i:nth-child(4) { left:15px; bottom:8px; }
.feed-stack i:nth-child(5) { left:16px; bottom:10px; }
.feed-reading { flex:1; min-width:0; display:grid; align-content:start; gap:6px; padding-top:6px; }
.feed-percent { display:flex; align-items:baseline; gap:2px; line-height:1.05; font-variant-numeric:tabular-nums; }
.feed-percent b { font-size:36px; font-weight:700; color:var(--ink); }
.feed-percent small { font-size:16px; font-weight:700; color:var(--muted); }
.paper-feed.is-done .feed-percent b { color:var(--sage); }
.feed-copies { font-size:13px; font-weight:700; color:var(--ink); overflow-wrap:anywhere; }
/* 收起: a copy of the card flies into the header's task mark (the card itself has closed). */
.task-ghost { position:fixed; z-index:70; display:flex; flex-direction:column; overflow:hidden; border-radius:20px; background:var(--surface);
  box-shadow:0 8px 28px #20251f2e; pointer-events:none; transform-origin:center; }
.task-ghost .task-body { overflow:hidden; }
/* Centred cards (IvoryDialogBuilder): 确认 dialogs, the submit wait, 选择目标打印机, 退出登录. */
#confirmMessage { overflow-wrap:anywhere; }
#overrideSheet .head h2 { margin:0; }
#logoutSheet .head h2 { margin:0; }
#logoutSheet .stacked-buttons { margin-top:20px; }

/* 设置与登录 alignment (round 10) */
/* Danger actions (Android IvoryDialogBuilder, 确认关闭, 拒绝): a light red fill with red ink. */
.primary.danger:active:not(:disabled),.danger-fill:active:not(:disabled) { background:#f3d8d2; }
@media (hover:hover) { .primary.danger:hover:not(:disabled),.danger-fill:hover:not(:disabled) { background:#f3d8d2; } }
/* 设置 rows (SettingsScreen.settingsActionRow): a 21 px leading icon, the title, the value beside
   it, or under it when longer than 8 characters (and always for 打印统计), then the chevron. */
.setting-row { gap:12px; }
.setting-row > .icon:first-child { width:21px; height:21px; color:var(--ink); opacity:.72; }
.setting-copy { flex:1; min-width:0; display:flex; align-items:center; gap:8px; }
.setting-copy > .setting-label { flex:1; min-width:0; }
.setting-row.is-below .setting-copy { flex-direction:column; align-items:stretch; gap:5px; }
.setting-row.is-below .setting-value { max-width:none; text-align:left; }
.preference-status.is-error { color:var(--err); }
/* The account overview's lines: the label left, the value right, a chevron when it opens. */
.overview-row { min-height:44px; padding:8px 12px; }
.overview-row .setting-label { color:var(--muted); }
.overview-row .setting-value { max-width:62%; font-size:14px; color:var(--ink); }
/* 重置打印计数: its 取消 under the two choices. */
.list-dialog .menu-item.menu-cancel { text-align:center; color:var(--muted); }
/* 默认打印机: 使用方式 优先 | 仅用这台 with its note. */
.choice-body .usage-label { margin:10px 0 6px; font-size:12px; }
.usage-choice .segment:disabled { opacity:.45; }
.choice-body .usage-note { margin:6px 0 2px; }
/* Account flows: a refused password said under its field; SecurityFlow's body buttons. */
.flow-field .flow-field-error { margin:0; font-size:13px; color:var(--err)!important; }
.flow-body .flow-link { width:100%; margin-top:0; }
/* Sign-in (LoginScreen): the eye in the password field, errors in red under the fields,
   忘记密码 on the right; the waiting, email-code and recovery panels in the same card. */
.login-lead:empty { display:none; }
#credentials { gap:12px; }
.password-field { display:grid; gap:8px; }
.password-box { position:relative; }
.password-box input { padding-right:52px; }
.card .password-box .password-toggle { position:absolute; top:0; right:0; width:48px; min-height:44px; height:44px; margin:0; color:var(--muted); }
.card .login-error { min-block-size:1lh; margin:0; font-size:13px; font-weight:650; color:var(--err); }
.card .forgot-link { justify-self:end; margin-top:0; }
.login-flow { display:grid; gap:12px; margin:12px 0; }
.card .login-flow button,.card .login-form button { margin-top:0; }
.card .login-flow p { margin:0; }
.login-form { display:grid; gap:12px; margin:0; }
.login-form > button { width:100%; }
.login-form .sheet-buttons { margin-top:4px; }
.card .login-flow .device-card { margin:4px 0 0; }
.card .challenge-status { min-height:52px; display:grid; place-items:center; text-align:center; font-size:14px; font-weight:650; color:var(--sage); }
.card .challenge-status.is-error { color:var(--err); }
.card .login-hint { font-size:13px; text-align:center; color:var(--muted); overflow-wrap:anywhere; }
.card .login-hint.is-error { color:var(--err); }
.card .login-hint.is-strong { text-align:left; font-size:15px; font-weight:650; color:var(--ink); }
.delivery-status:empty { display:none; }
.code-input.is-invalid { border-color:var(--err); background:#fff1ee; }
.recovery-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin:0; padding:0; list-style:none; font-size:11px; text-align:center; color:var(--muted); }
.recovery-steps .is-active,.recovery-steps .is-done { color:var(--sage); font-weight:700; }
.login-done { display:grid; justify-items:center; gap:8px; padding:12px 0 4px; }
.card .login-done-label { font-size:22px; font-weight:700; color:var(--ink); }

/* 设置、登录与全局 alignment (round 11) */
/* Dialogs (IvoryMotion): a sheet rises from below the screen in 280 ms and drops in 200 ms; a
   centred dialog grows from .96 in 220 ms and leaves at .98 in 150 ms; the dim is 30 % and fades
   with them. navigation.mjs keeps a closing dialog open with data-closing while its exit plays. */
dialog::backdrop { background:#20251f4d; }
dialog[open] { animation:ivory-sheet-in 280ms cubic-bezier(.2,0,0,1); }
dialog[open]::backdrop { animation:ivory-dim-in 280ms linear; }
dialog.center-dialog[open] { animation:ivory-dialog-in 220ms cubic-bezier(.2,0,0,1); }
dialog.center-dialog[open]::backdrop { animation-duration:220ms; }
dialog[data-closing] { animation:ivory-sheet-out 200ms cubic-bezier(.4,0,1,1) forwards; pointer-events:none; }
dialog[data-closing]::backdrop { animation:ivory-dim-out 200ms linear forwards; }
dialog.center-dialog[data-closing] { animation:ivory-dialog-out 150ms cubic-bezier(.4,0,1,1) forwards; }
dialog.center-dialog[data-closing]::backdrop { animation-duration:150ms; }
/* The conversation is a page sliding over the list, not a sheet: nothing dims under it
   (ChatScreen clears FLAG_DIM_BEHIND). */
#thread::backdrop { background:transparent; animation:none; }
@keyframes ivory-sheet-in { from { transform:translateY(100%); } }
@keyframes ivory-sheet-out { to { transform:translateY(100%); } }
@keyframes ivory-dialog-in { 0% { opacity:0; transform:scale(.96); } 73% { opacity:1; } 100% { transform:none; } }
@keyframes ivory-dialog-out { to { opacity:0; transform:scale(.98); } }
@keyframes ivory-dim-in { from { opacity:0; } }
@keyframes ivory-dim-out { to { opacity:0; } }
/* IvoryMenu: the icons in the accent (danger rows keep their red). */
.menu-row .icon { color:var(--sage); }
/* IvorySnackbar's loading tone: a turning ring in the accent where the mark would be. */
.snackbar-spinner { width:18px; height:18px; border-radius:50%; border:2px solid var(--sage); border-right-color:transparent; animation:snackbar-spin .8s linear infinite; }
@keyframes snackbar-spin { to { transform:rotate(360deg); } }
/* MainActivity.crossfade: a new theme's colours fade in over 240 ms (theme.mjs). */
html.is-theme-fading, html.is-theme-fading * { transition:background-color 240ms ease, color 240ms ease, border-color 240ms ease, fill 240ms ease, stroke 240ms ease !important; }
/* The email delivery card (EmailDeliveryDialog): fixed in size, the mark, the words, the actions. */
dialog.delivery-dialog { width:min(calc(100% - 32px),400px); padding:34px 26px 24px; text-align:center; }
.delivery-body { display:grid; justify-items:center; }
.delivery-mark { position:relative; display:grid; place-items:center; width:92px; height:92px; color:var(--sage); }
.delivery-mark .icon { width:40px; height:40px; transition:transform 460ms cubic-bezier(.4,0,1,1), opacity 460ms ease; }
.delivery-ring { position:absolute; inset:6px; border-radius:50%; border:3px solid var(--soft); border-top-color:var(--sage); animation:snackbar-spin 1.1s linear infinite; }
.delivery-mark.is-sent .icon { transform:translate(28px,-34px) scale(.7); opacity:0; }
.delivery-mark.is-sent .delivery-ring { animation:none; border-color:var(--soft); }
.delivery-mark.is-failed { width:72px; height:72px; color:var(--err); }
.delivery-mark.is-failed .icon { width:56px; height:56px; }
.center-dialog .delivery-title { margin:20px 0 0; font-size:22px; font-weight:700; color:var(--ink); }
.center-dialog .delivery-text { margin:8px 0 0; font-size:15px; color:var(--muted); overflow-wrap:anywhere; }
.center-dialog .delivery-small { margin:4px 0 0; font-size:13px; color:var(--muted); }
.delivery-body .sheet-buttons { width:100%; margin-top:24px; }
.delivery-body .delivery-stop { width:100%; margin-top:24px; min-height:52px; }
/* Success (LoginScreen / SecurityFlow.success): a 108 px check with its 24 px label, no title. */
.flow-check.is-large { width:108px; height:108px; }
.flow-check.is-large::after { left:40px; top:24px; width:22px; height:42px; border-width:0 5px 5px 0; }
.flow-done { display:grid; justify-items:center; gap:12px; padding:8px 0 4px; }
.center-dialog .flow-done-label, .card .login-done-label { margin:0; font-size:24px; font-weight:700; color:var(--ink); }
/* Sign-in (LoginScreen): 共享云打印 · 登录后开始打印 with the picture on the right; done steps green;
   停止等待 under the note once signing in takes long; an ended sign-in said in amber. */
.login-brand { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; }
.login-brand-copy { min-width:0; }
.login-brand h1 { font-size:28px; margin:0; }
.login-sub { margin:4px 0 0; font-size:14px; color:var(--muted); }
.login-art { flex:none; width:135px; height:115px; object-fit:contain; }
.recovery-steps .is-done { color:#52644f; }
#loginNote.is-warning { color:var(--amber); font-weight:650; }
/* The note keeps its one line while empty (16 px × 1.5), so 正在登录… and 正在重置密码… move
   nothing as they come and go. 停止等待 still adds its own height when it appears. */
#loginNote { min-height:1.5em; }
#loginStop { width:100%; margin-top:8px; }
/* 打印机状态: a 永不使用 printer is dimmed (SettingsScreen.printerStatusRow). */
.status-row.is-excluded strong { color:var(--muted); }
/* What's new (MainActivity.showWhatsNewIfNeeded): titles in bold, details under them. */
.whats-new-body { max-height:min(60dvh,420px); overflow:auto; overscroll-behavior:contain; }
#usagePolicyDialog[open] { display:flex; flex-direction:column; overflow:hidden; }
#usagePolicyDialog > :not(.whats-new-body) { flex:none; }
#usagePolicyDialog .whats-new-body { min-height:0; }
.usage-policy-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.usage-policy-head h2 { margin:0; }
#usagePolicyVersion, #usagePolicyHint { color:var(--muted); font-size:13px; }
#usagePolicyVersion { margin:4px 0 10px; }
#usagePolicyHint { margin:12px 0 0; }
.whats-new-version { margin:0 0 6px; font-size:13px; color:var(--muted); }
.whats-new-item { margin:0 0 14px; }
.whats-new-item strong { display:block; font-size:15px; color:var(--ink); }
.whats-new-item p { margin:4px 0 0; font-size:14px; color:var(--muted); }

/* 打印设置 alignment (round 10) */
/* The file name on one line, shortened in the middle; the extension and the batch count stay. */
.sheet-file { display:flex; min-width:0; }
/* The paper while a preview is prepared or failed (PrintPreviewView's rail): the step, a bar, the
   time left on a line of its own, and 继续等待 / 重试预览. Rows keep their height as texts change. */
.paper-wait { width:min(100%,280px); text-align:center; }
.paper-wait-text { overflow-wrap:anywhere; }
.paper-wait .task-bar { flex:none; width:100%; height:5px; }
.paper-wait-eta { display:block; min-height:1.5em; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
.paper-wait[data-kind="failed"] .paper-wait-text, .paper-wait[data-kind="range"] .paper-wait-text { color:var(--ink); }
.task-bar.is-indeterminate { position:relative; }
.task-bar.is-indeterminate i { position:absolute; top:0; bottom:0; left:0; width:40%; animation:launch-bar 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion:reduce) { .task-bar.is-indeterminate i { animation:none; width:100%; opacity:.4; } }
/* The printer tray: 正在读取打印机…, or the failure in red with 重试. */
.tray-hint.is-error { color:var(--err); }
#printerRetry { justify-self:start; }
.tray input.is-invalid { border-color:var(--err); }
/* 批次文件 (PrintBatch.showBatchStatusSheet): a finished file of the batch, read-only. */
.batch-file { display:grid; gap:10px; padding:20px 2px 8px; }
.batch-file-status { margin:0; font-size:20px; font-weight:700; color:var(--sage); font-variant-numeric:tabular-nums; }
.batch-file .task-bar { flex:none; height:6px; }
.batch-file-detail { margin:4px 0 0; min-height:1.5em; font-size:14px; color:var(--muted); }
.batch-file-hint { margin:8px 0 0; font-size:12px; color:var(--muted); }
.batch-row:not(:disabled) { cursor:pointer; }
/* Submitting (MainActivity.showBusy): a small centred card with the print motion. */
#progress { text-align:center; }
#progress .motion { width:52px; height:52px; margin:2px auto 12px; border-radius:16px; }
#progress .busy-label { margin:0 0 4px; }
#progress p.progress-name { margin:0; font-size:13px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#progress p.progress-note { margin:8px 0 0; font-size:12px; color:var(--muted); }
/* The large view (PrintPreviewView.enlarge): the page fills it; two fingers zoom it, one moves it. */
#largePage { position:relative; height:min(62dvh,calc(var(--viewport-height,100dvh) - 250px)); min-height:200px; overflow:hidden; touch-action:none;
  border-radius:12px; background:var(--sunken); -webkit-user-select:none; user-select:none; }
.zoom-content { width:100%; height:100%; padding:8px; display:grid; place-items:center; will-change:transform; }
.zoom-content > canvas { background:#fff; box-shadow:0 1px 6px #20251f22; }
.zoom-content .spread { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:minmax(0,1fr) auto; gap:6px 14px; width:100%; height:100%; }
#zoomPage { white-space:pre-line; text-align:center; font-size:12px; color:var(--muted); }
/* While the large page is drawn: the page's shape the first time (inside the 8 px the page keeps);
   after that the page shown stays, dimmed as the sheet's, under 正在更新预览. */
#largePage > .paper-skeleton { display:block; height:calc(100% - 16px); margin:8px auto; }
#largePage > .is-stale { opacity:.45; transition:opacity 120ms var(--motion-ease); }

/* 打印流程 alignment (round 11) */
/* The paper with no page yet (PreviewSkeletonView): the page's shape over the step, its sheen
   crossing while it loads; at rest once it failed or timed out. */
.paper-box { position:relative; }
.paper-box.has-skeleton { grid-template-rows:minmax(0,1fr) auto; gap:10px; }
.paper-skeleton { height:100%; max-width:100%; min-height:0; aspect-ratio:707/1000; background:var(--surface); box-shadow:0 1px 6px #20251f14; }
.paper-skeleton .sheen-line { stop-color:var(--line); }
.paper-skeleton .sheen-light { stop-color:color-mix(in srgb,var(--line) 35%,var(--surface)); }
.paper-skeleton:not(.is-loading) rect { fill:var(--line); }
/* PrintPreviewView.update: a page drawn again stays dimmed to 45 % under 正在更新预览 (shown only if
   the drawing takes a moment) until the new one is there. */
.paper-box > .is-stale { opacity:.45; transition:opacity 120ms var(--motion-ease); }
.paper-updating { position:absolute; left:50%; bottom:14px; transform:translateX(-50%); padding:4px 12px; border-radius:999px;
  background:var(--surface); border:1px solid var(--line); color:var(--muted); font-size:12px; white-space:nowrap; pointer-events:none;
  animation:paper-updating-in 150ms ease-out 150ms backwards; }
@keyframes paper-updating-in { from { opacity:0; } }
/* 从云盘打印 (CloudPrintPicker): the header's refresh beside 关闭, 重试 beside a failed read, and the
   empty cloud with its icon. */
#pickerHead h2 { flex:1; min-width:0; }
#pickerHead { gap:0; }
.picker-retry { float:right; min-height:32px; margin:-6px 0 0 8px; }
.picker-empty > .icon { display:block; width:36px; height:36px; margin:18px auto 0; color:var(--muted); }
.picker-empty > strong { display:block; margin:16px 0 8px; font-size:18px; color:var(--ink); }
.picker-empty > span { display:block; }
/* 批次文件: the submitted file's steps, as in 打印任务. */
.batch-file .task-steps { margin:2px 0 0; }
/* Press feedback. A list row never shrinks: it takes the sunken tint, the same on every list
   (menus, 云盘 and 消息 rows, 设置 rows, mail, people, 分享 and 改派 rows, radio rows); filled, soft and
   icon buttons keep the base scale(.97). A pinned conversation already rests on that tint, so it
   goes one step darker. A job row is a div: it tints unless one of its own buttons is pressed.
   The tab under the finger shows the pill's colour. */
.menu-row:active:not(:disabled),.menu-item:active:not(:disabled),.cloud-main:active:not(:disabled),.setting-row:active:not(:disabled),
.identity-row:active:not(:disabled),.mail-row:active:not(:disabled),.person-row:active:not(:disabled),button.row:active:not(:disabled),
.choice-list .choice:active:not(:disabled),.conv-main:active:not(:disabled) { transform:none; background:var(--sunken); }
.conv-row.is-pinned .conv-main:active:not(:disabled) { background:var(--line); background:color-mix(in srgb,var(--sunken) 88%,var(--ink)); }
.job-row.is-tappable { transition:background-color 180ms var(--motion-ease); }
.job-row.is-tappable:active:not(:has(button:active)) { background:var(--sunken); }
nav a span { transition:background-color 180ms var(--motion-ease); }
nav a:active span { background:var(--soft); }

/* Public file reading uses the same paper renderer as print confirmation. */
dialog.public-file-preview { width:min(94vw,960px); max-width:960px; height:min(88dvh,820px); max-height:88dvh; padding:0; border-radius:18px; overflow:hidden; }
dialog.public-file-preview[open] { display:flex; flex-direction:column; }
.public-preview-heading,.public-preview-toolbar,.public-preview-footer { display:flex; align-items:center; gap:8px; padding:10px 14px; flex:none; }
.public-preview-heading { border-bottom:1px solid var(--line); }
.public-preview-heading strong { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.public-preview-heading button { flex:none; }
.public-preview-toolbar { justify-content:flex-end; }
.public-preview-toolbar span { min-width:44px; text-align:center; }
.public-preview-paper-area { flex:1; min-height:0; overflow:auto; padding:8px; background:var(--sunken,var(--paper)); touch-action:none; }
.public-preview-paper-area.pannable { cursor:grab; }
.public-preview-paper { display:flex; justify-content:center; align-items:center; min-width:100%; min-height:100%; width:max-content; height:max-content; }
.public-preview-paper canvas { flex:none; max-width:none; max-height:none; background:white; box-shadow:0 2px 12px #0002; }
.public-preview-state { flex:none; padding:8px 16px; margin:0; font-size:13px; }
.public-preview-footer { flex-wrap:wrap; border-top:1px solid var(--line); }
.public-preview-footer span { margin-right:auto; font-size:12px; }
.public-file-preview button { min-height:40px; }
.public-file-preview > button { margin:8px 14px; align-self:center; }

.public-folder-modes { display:flex; align-items:center; gap:8px; height:54px; overflow-x:auto; overflow-y:hidden; margin:8px 0 12px; scrollbar-width:thin; }
.public-folder-modes[hidden] { display:none; }
.public-folder-modes button { flex:none; min-height:42px; border-radius:10px; }
.public-folder-modes button.active { background:var(--soft); color:var(--sage); }
.public-folder-modes .cloud-row { flex:none; display:flex; padding:0; align-items:center; border:1px solid var(--line); border-radius:10px; width:auto; min-height:42px; }
.public-folder-modes .cloud-row .cloud-main { flex:none; display:flex; padding:0 7px; gap:6px; min-height:40px; max-width:176px; }
.public-folder-modes .cloud-copy strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.public-folder-modes .cloud-row::before,.public-folder-modes .cloud-check,.public-folder-modes .cloud-copy small { display:none; }
.public-folder-modes .ext-tile { width:23px; height:24px; }
.public-folder-modes .cloud-more { display:grid; min-height:40px; width:34px; opacity:1; }
#cloudList.public-folder-list { display:flow-root; min-height:300px; }
.cloud-main .ext-tile.is-folder + .cloud-copy .name-head { white-space:normal; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }


/* Make room for the persistent security notice above the navigation. */
.device-reverify-notice { position:fixed; z-index:3; bottom:calc(var(--viewport-bottom,0px) + var(--navigation-height,64px) + 8px); left:50%; transform:translateX(-50%); width:min(546px,calc(100% - 28px)); display:grid; grid-template-columns:24px minmax(0,1fr); gap:7px 10px; padding:11px 12px; color:#544225; background:#fbf7ed; border:1px solid #ddcba8; border-radius:12px; box-shadow:0 3px 12px #38280911; }
.device-reverify-notice > div { grid-column:2; grid-row:1; }
.device-reverify-notice > svg { grid-column:1; grid-row:1; }
.device-reverify-notice small { display:block; line-height:1.4; }
.device-reverify-notice button { grid-column:2; grid-row:2; justify-self:start; }
.workspace:has(.device-reverify-notice:not([hidden])) main { padding-bottom:calc(242px + env(safe-area-inset-bottom)); }
html[data-keyboard="true"] .device-reverify-notice { display:none; }
.device-reverify-head { justify-content:space-between; }
.device-reverify-badge { display:grid; place-items:center; width:36px; height:36px; border-radius:9px; background:var(--soft); color:var(--sage); }
.device-reverify-dialog h2 { margin:10px 0 6px; }
.device-reverify-choices { border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.device-reverify-dialog .setting-row { width:100%; border-radius:0; }
.device-reverify-dialog .setting-row + .setting-row { border-top:1px solid var(--line); }
.device-reverify-dialog .setting-row span,.device-reverify-status > div { flex:1; min-width:0; text-align:left; }
.device-reverify-dialog .setting-row small,.device-reverify-status small { display:block; margin-top:3px; color:var(--muted); }
.device-reverify-status small:empty { display:none; }
.device-reverify-status { display:flex; align-items:center; gap:10px; padding:11px 12px; margin:12px 0; background:var(--soft); color:var(--sage); border-radius:10px; }
.device-reverify-status .icon { flex:none; }
.device-reverify-spin { width:16px; height:16px; flex:none; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:device-reverify-turn .9s linear infinite; }
@keyframes device-reverify-turn { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .device-reverify-spin { animation:none; } }
.device-reverify-dialog input[name="code"] { width:100%; margin:6px 0 12px; }
#deviceReverifyError { color:var(--danger,#933d2d); }
#deviceReverifyError:empty { display:none; }
.device-reverify-actions { display:flex; justify-content:flex-end; gap:8px; }

/* Recommended actions permanent header button + dialog cards */
.rec-button { position:relative; border-radius:999px; color:var(--muted); }
.rec-button .rec-icon-alert,.rec-button .rec-icon-ok { display:grid; place-items:center; }
.rec-button .rec-icon-alert[hidden],.rec-button .rec-icon-ok[hidden] { display:none; }
.rec-button.is-clear { color:var(--muted); }
.rec-button.is-snoozed { color:var(--ink); }
.rec-button.is-recommended { color:#9a6006; background:#faefd6; }
.rec-button.is-critical { color:var(--err,#c0523f); background:#f5e3de; }
.rec-count { position:absolute; top:2px; right:2px; min-width:16px; height:16px; padding:0 4px; border-radius:99px; font-style:normal; font-size:10px; font-weight:700; line-height:16px; text-align:center; color:#fff; background:#a97f33; }
.rec-button.is-critical .rec-count { background:var(--err,#c0523f); }
.rec-pip { position:absolute; right:7px; bottom:7px; width:7px; height:7px; border-radius:50%; background:#b9a47e; box-shadow:0 0 0 2px var(--paper,#f7f4ef); }
.rec-card { position:relative; padding:12px 12px 12px 15px; border:1px solid var(--line); border-radius:13px; background:var(--surface); margin-bottom:10px; }
.rec-card::before { content:""; position:absolute; left:0; top:10px; bottom:10px; width:3.5px; border-radius:0 4px 4px 0; background:#a97f33; }
.rec-card.is-critical::before { background:var(--err,#c0523f); }
.rec-card.is-warning::before { background:#d98a0b; }
.rec-card-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.rec-tag { display:inline-flex; padding:2px 7px; border-radius:6px; font-size:11px; font-weight:700; background:#f6eedc; color:#805f25; }
.rec-tag.is-critical { background:#f5e3de; color:#8f3527; }
.rec-tag.is-warning { background:#faefd6; color:#9a6006; }
.rec-card-time { font-size:11px; color:var(--muted); }
.rec-card-title { display:block; margin:6px 0 4px; font-size:14px; color:var(--ink); }
.rec-card-desc { margin:0; font-size:12.5px; color:var(--muted); line-height:1.6; }
.rec-card-evidence { margin-top:7px; padding:6px 9px; border-radius:8px; background:var(--sunken); font-size:11.5px; color:var(--muted); display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.rec-ev-sep { opacity:.5; }
.rec-ev-link { margin-left:auto; font-size:11.5px; padding:0 2px; min-height:0; }
.rec-card-footer { margin-top:10px; display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.rec-card-ctas { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.rec-btn { min-height:34px; padding:5px 12px; font-size:12.5px; border-radius:9px; }
.rec-btn.is-danger { background:var(--err,#c0523f); color:#fff; border-color:transparent; }
.rec-snooze-toggle { min-height:30px; font-size:12px; color:var(--muted); }
.rec-snooze-drawer { margin-top:9px; padding:9px 10px; border-radius:10px; background:var(--sunken); }
.rec-snooze-head { display:flex; justify-content:space-between; gap:8px; margin-bottom:7px; font-size:11.5px; color:var(--ink); }
.rec-snooze-head small { color:var(--muted); font-size:11px; }
.rec-snooze-chips { display:flex; flex-wrap:wrap; gap:6px; }
.rec-snooze-chip { min-height:30px; padding:4px 10px; font-size:12px; border-radius:8px; }
.rec-calm { padding:14px; border-radius:12px; background:var(--sunken); text-align:center; }
.rec-calm strong { display:block; font-size:14px; color:var(--ink); margin-bottom:4px; }
.rec-calm p { margin:0; font-size:12.5px; color:var(--muted); line-height:1.55; }
.rec-snoozed-section { margin-top:12px; padding-top:10px; border-top:1px dashed var(--line); }
.rec-snoozed-head { font-size:11.5px; font-weight:700; color:var(--muted); margin-bottom:8px; }
.rec-snoozed-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 10px; border-radius:10px; background:var(--sunken); margin-bottom:7px; }
.rec-snoozed-copy { min-width:0; }
.rec-snoozed-copy strong { display:block; font-size:12.5px; color:var(--ink); }
.rec-snoozed-copy small { font-size:11px; color:var(--muted); }
.rec-exec-now { flex:none; min-height:30px; padding:4px 10px; font-size:12px; border-radius:8px; }
.rec-toggle-snoozed-wrap { display:flex; justify-content:flex-end; margin-top:4px; }
