:root {
  color-scheme: light;
  --ink: #2b2626;
  --secondary: #6c625f;
  --line: #eae1da;
  --paper: #fffdfa;
  --accent: #a84437;
  --wash: #f9ede7;
  --canvas: #eee8e2;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: #faf8f4;
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.mobile-only { display: none; }
.editor-shell { display: contents; }
body { margin: 0; min-width: 280px; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, textarea:focus-visible { outline: 2px solid #b45a46; outline-offset: 3px; }
.topbar { border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar-inner, main { max-width: 1392px; margin: auto; padding-inline: clamp(16px, 4vw, 58px); }
.topbar-inner { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.06rem; font-weight: 750; white-space: nowrap; }
.brand-icon { position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; width: 33px; height: 28px; background: var(--accent); border-radius: 9px; }
.brand-icon::after { content: ''; width: 8px; height: 8px; position: absolute; left: 7px; bottom: -2px; background: var(--accent); transform: rotate(-28deg); border-radius: 2px; }
.brand-icon i { width: 3px; height: 3px; background: white; border-radius: 50%; }
.privacy { display: inline-flex; align-items: center; gap: 8px; color: var(--secondary); font-size: .875rem; }
.privacy-dot { display: inline-block; background: #4b795d; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 25px 0 22px; }
h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 780; line-height: 1.2; letter-spacing: -.035em; }
.intro p { margin: 0; color: var(--secondary); line-height: 1.5; }
.intro-actions { display: flex; gap: 8px; flex: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 650; font-size: .875rem; white-space: nowrap; }
.button.subtle { border-color: #e1d6ce; color: var(--ink); background: var(--paper); }
.button.subtle:hover:not(:disabled) { background: #f5efe9; }
.button.ink { background: var(--ink); color: white; }
.button.ink:hover { background: #493e3b; }
.upload-icon { font-size: 1.15rem; line-height: 1; }
.button.primary { background: var(--accent); color: white; font-size: .96rem; min-height: 45px; }
.button.primary:hover:not(:disabled) { background: #90392f; }
.button:disabled { opacity: .46; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 352px); gap: 16px; min-width: 0; }
.viewer, .editor { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; min-width: 0; overflow: hidden; box-shadow: 0 2px 5px #46302708; }
.viewer { display: flex; flex-direction: column; }
.viewer-bar, .viewer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; min-height: 53px; flex: none; }
.viewer-bar { border-bottom: 1px solid var(--line); }
.viewer-footer { border-top: 1px solid var(--line); min-height: 43px; color: var(--secondary); font-size: .875rem; }
.file-info { display: flex; gap: 9px; align-items: center; font-size: .875rem; min-width: 0; }
#file-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#file-size { color: var(--secondary); flex: none; font-size: .8rem; }
.file-icon { height: 15px; width: 12px; border: 1.5px solid #94817b; flex: none; border-radius: 3px; transform: rotate(-7deg); }
.segmented { display: inline-flex; background: #f2ece7; padding: 3px; border-radius: 8px; flex: none; }
.segmented button, .zoom button { border: 0; border-radius: 6px; background: transparent; color: var(--secondary); padding: 4px 9px; min-height: 28px; font-size: .875rem; }
.segmented button[aria-pressed="true"] { background: white; color: var(--ink); box-shadow: 0 1px 2px #46302722; }
.segmented button:disabled, .zoom button:disabled { opacity: .52; }
.zoom { display: flex; align-items: center; white-space: nowrap; }
.zoom button:hover:not(:disabled) { background: #f2ece7; }
.viewport { height: clamp(390px, calc(100dvh - 298px), 850px); overflow: auto; background-color: var(--canvas); background-image: radial-gradient(#d7cbc3 1px, transparent 1px); background-size: 16px 16px; position: relative; }
.viewer.dragging .viewport { box-shadow: inset 0 0 0 3px var(--accent); }
.image-stage { padding: 18px; min-height: 100%; min-width: 100%; width: max-content; height: max-content; display: grid; place-items: center; }
.paper { position: relative; background: white; box-shadow: 0 8px 28px #35201f35; flex: none; }
canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
#canvas { touch-action: manipulation; }
.paper.selecting #canvas, .paper.erasing #canvas { touch-action: none; }
.paper.erasing #canvas { cursor: none; }
#mask-preview, #brush-cursor { position: absolute; pointer-events: none; }
#mask-preview { inset: 0; }
#brush-cursor { transform: translate(-50%, -50%); border: 1.5px solid white; box-shadow: 0 0 0 1px #1c4a6f; border-radius: 50%; }
.overlay { position: absolute; inset: 0; pointer-events: none; }
.marker { position: absolute; display: grid; place-items: center; pointer-events: auto; transform: translate(-50%, -50%); min-width: 27px; height: 27px; padding: 1px 5px; background: var(--accent); color: white; border: 2px solid white; border-radius: 15px; box-shadow: 0 2px 5px #36272562; font-size: .82rem; font-weight: 750; line-height: 1; }
.marker.active { background: #87372b; box-shadow: 0 0 0 3px #c96855a1; }
.marker.warning { background: #a72b28; box-shadow: 0 0 0 2px #a72b28, 0 2px 5px #36272562; }
.marker.warning.active { box-shadow: 0 0 0 3px #be3a37, 0 2px 5px #36272562; }
.paper.selecting .marker, .paper.erasing .marker { pointer-events: none; opacity: .22; }
.outline { position: absolute; border-radius: 4px; }
.outline.selection { border: 2px dashed #a6400b; outline: 1px solid #fff9f2; background: #ffd6a832; }
.outline.unrecognized { border: 2px dashed #b63131; outline: 1px solid #fff9f2; background: #b6313114; }
.unrecognized-label { position: absolute; top: -2px; left: -2px; transform: translateY(-100%); padding: 1px 5px; border-radius: 4px 4px 0 0; background: #ac292b; color: #fff; font-size: .76rem; white-space: nowrap; }
.unrecognized.near-top .unrecognized-label { transform: none; border-radius: 3px; }
.marker { z-index: 4; }
.marker[aria-pressed="true"] { box-shadow: 0 0 0 3px #c96855a1, 0 2px 5px #36272562; }
.text-frame { position: absolute; transform: translate(-50%, -50%) rotate(var(--turn, 0deg)); border: 1px solid transparent; border-radius: 2px; cursor: move; touch-action: none; pointer-events: auto; }
.text-frame.active { border-color: #2165ed; outline: 1px solid #ffffffe0; z-index: 1; }
.text-frame:focus-visible { outline: 2px solid #d5e2ff; }
.frame-handle { display: none; position: absolute; width: 12px; height: 12px; padding: 0; border: 1.5px solid #2165ed; border-radius: 3px; background: white; touch-action: none; }
.text-frame.active .frame-handle { display: block; }
.frame-handle::after { content: ''; position: absolute; inset: -4px; }
.frame-handle.nw { left: 0; top: 0; transform: translate(-50%, -50%); cursor: nwse-resize; }
.frame-handle.ne { right: 0; top: 0; transform: translate(50%, -50%); cursor: nesw-resize; }
.frame-handle.sw { left: 0; bottom: 0; transform: translate(-50%, 50%); cursor: nesw-resize; }
.frame-handle.se { right: 0; bottom: 0; transform: translate(50%, 50%); cursor: nwse-resize; }
.frame-handle.east { right: 0; top: 50%; transform: translate(50%, -50%); cursor: ew-resize; }
.text-frame[data-writing="vertical"] .frame-handle.east { top: auto; right: auto; bottom: 0; left: 50%; transform: translate(-50%, 50%); cursor: ns-resize; }
.frame-handle.turn { left: 50%; top: -20px; transform: translate(-50%, -50%); cursor: grab; border-radius: 50%; }
.frame-handle.turn::before { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 15px; background: #2165ed; }
.empty-canvas, .empty-list { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--secondary); padding: 20px; }
.empty-canvas { height: 100%; min-height: 230px; }
.empty-icon { border: 1px dashed #bba79d; width: 54px; height: 52px; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: var(--paper); font-size: 1.35rem; }
.empty-canvas strong, .empty-list strong { color: var(--ink); font-size: 1rem; }
.empty-canvas > span:not(.empty-icon), .empty-list p { font-size: .875rem; }
.editor { display: flex; flex-direction: column; max-height: calc(clamp(390px, 100dvh - 298px, 850px) + 98px); }
.editor-head { padding: 17px 17px 14px; border-bottom: 1px solid var(--line); }
.editor-title-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.editor-head h2 { margin: 0; font-size: 1.16rem; }
#placement-mode { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; }
.count { border-radius: 20px; background: var(--wash); color: #873a30; font-weight: 700; padding: 4px 9px; font-size: .82rem; white-space: nowrap; }
.editor-body { flex: 1 1 auto; overflow: auto; min-height: 0; }
.empty-list { min-height: 224px; height: 100%; }
.empty-list p { margin: 0; line-height: 1.55; }
.empty-bubble { position: relative; width: 42px; height: 34px; display: grid; place-items: center; background: var(--wash); color: var(--accent); border-radius: 10px; font-size: 1.45rem; font-weight: 700; }
.empty-bubble::after { content: ''; position: absolute; width: 9px; height: 9px; left: 7px; bottom: -2px; border-radius: 2px; background: var(--wash); transform: rotate(-25deg); }
.mark-list { list-style: none; margin: 0; padding: 12px; display: grid; gap: 8px; }
.mark-list:empty { display: none; }
.mark-row { padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fffdfa; }
.mark-row.active { border-color: #d29686; background: #fffbf7; }
.mark-row.unrecognized { border-color: #c34744; }
.mark-row.unrecognized.active { background: #fff6f4; box-shadow: 0 0 0 1px #c34744; }
.mark-row.unrecognized .mark-state, .mark-row.unrecognized .adjust { color: #a52527; }
.mark-head, .mark-label, .mark-actions { display: flex; gap: 8px; align-items: center; }
.mark-head { justify-content: space-between; margin-bottom: 6px; }
.mark-label { font-size: .875rem; font-weight: 650; white-space: nowrap; }
.mark-actions { gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.number { min-width: 26px; height: 26px; display: grid; place-items: center; padding: 0 5px; border: 1px solid transparent; border-radius: 14px; background: var(--wash); color: #873a30; font-size: .79rem; font-weight: 700; }
.number[aria-pressed="true"] { background: #87372b; color: #fff; }
.mark-name { display: inline-flex; align-items: center; gap: 6px; }
.mark-state { font-size: .82rem; color: #6d5c53; line-height: 1.4; margin: 6px 0 0; }
.mark-state[data-tone="warning"] { color: #874914; font-weight: 650; }
.mark-state[data-tone="ready"] { color: #39624b; }
.remove { color: #786763; background: transparent; border: 0; border-radius: 6px; font-size: 1.2rem; width: 25px; height: 25px; line-height: 1; }
.remove:hover { background: var(--wash); color: var(--accent); }
.mark-row textarea { width: 100%; display: block; resize: vertical; min-height: 54px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font-size: .875rem; line-height: 1.45; }
.mark-row textarea::placeholder { color: #786c68; }
.row-message { font-size: .8rem; color: #804d27; line-height: 1.4; margin: 6px 0 0; }
.adjust { border: 0; border-radius: 6px; background: transparent; color: #894437; padding: 4px 5px; font-size: .875rem; white-space: nowrap; }
.adjust:hover { background: var(--wash); }
.adjust:disabled { opacity: .5; }
.text-transform { margin-top: 6px; color: var(--secondary); font-size: .875rem; }
.text-tools { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.text-direction { display: inline-flex; gap: 5px; align-items: stretch; }
.writing-mode { padding: 0 8px; border: 1px solid #dfe4ec; border-radius: 7px; background: #f1f4f8; color: var(--ink); font-size: .875rem; white-space: nowrap; }
.writing-mode:hover { background: #e4eaf2; }
.writing-mode[aria-pressed="true"] { background: #dce8ff; color: #135bea; }
.align-buttons { display: flex; gap: 2px; padding: 2px; border: 1px solid #dfe4ec; border-radius: 7px; background: #f1f4f8; }
.align-buttons button { display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; padding: 0; width: 31px; height: 28px; }
.align-buttons button:hover { background: #e4eaf2; }
.align-buttons button[aria-pressed="true"] { background: #dce8ff; color: #135bea; }
.align-buttons svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.align-buttons .vertical-align, .align-buttons[data-writing="vertical"] .horizontal-align { display: none; }
.align-buttons[data-writing="vertical"] .vertical-align { display: inline; }
.color-buttons button { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 4px 6px; }
.color-dot { width: 10px; height: 10px; border: 1px solid #80746d; border-radius: 50%; }
.color-dot.black { background: #000; }
.color-dot.white { background: #fff; }
.text-transform summary { cursor: pointer; padding: 3px 0; }
.transform-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 5px; }
.transform-fields label, .mask-controls { min-width: 0; }
.transform-fields label > span, .mask-controls label { display: flex; justify-content: space-between; gap: 4px; }
.transform-fields output, .mask-controls output { white-space: nowrap; color: var(--accent); }
input[type="range"] { display: block; width: 100%; min-width: 0; margin: 3px 0 0; accent-color: var(--accent); }
.canvas-actions { display: flex; justify-content: flex-end; align-items: center; gap: 7px; flex-wrap: wrap; }
.mask-controls { display: flex; justify-content: flex-end; align-items: center; gap: 9px; flex-wrap: wrap; font-size: .875rem; padding: 7px 14px; background: #eef4fb; border-bottom: 1px solid #dae5f1; }
.mask-controls label { gap: 8px; }
.mask-size { display: flex; align-items: center; gap: 8px; }
.mask-controls input[type="range"] { width: clamp(65px, 15vw, 140px); margin: 0; }
.mask-history { background: white; border: 1px solid #dae5f1; }
.mask-history button { display: grid; place-items: center; min-width: 34px; padding: 3px 6px; color: #405066; }
.mask-history button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.mask-history button:disabled { opacity: .33; }
.mask-history button:hover:not(:disabled) { background: #e8eff8; color: #134b88; }
.brush-modes { background: #e8eff8; }
.brush-modes button[aria-pressed="true"] { color: #134b88; }
.editor-footer { display: grid; gap: 6px; padding: 11px 14px 13px; border-top: 1px solid var(--line); background: #fffdfa; }
.status { font-size: .875rem; color: var(--secondary); line-height: 1.45; }
.status:empty { display: none; }
.status[data-kind="warning"] { color: #8d4b23; }
.page-note { margin: 11px 0 18px; color: var(--secondary); font-size: .875rem; line-height: 1.45; }
.preview-label { display: inline-block; vertical-align: middle; border: 1px solid #dfc8ba; border-radius: 100px; background: #fff8ee; color: #80452b; padding: 4px 8px; font-size: .8rem; letter-spacing: 0; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.selection-feedback { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 7px 12px; min-height: 57px; background: #fffcf8; border-bottom: 1px solid var(--line); }
.selection-feedback[data-tone="warning"] { background: #fff1dc; border-bottom-color: #e7c693; }
.selection-feedback[data-tone="ready"] { background: #f6faf5; border-bottom-color: #dbe7da; }
.selection-feedback strong, .selection-feedback span { display: block; font-size: .88rem; line-height: 1.36; }
.selection-feedback span { font-size: .84rem; color: var(--secondary); }
.selection-feedback strong { color: var(--ink); }
.selection-feedback[data-tone="warning"] strong { color: #783a13; }
.selection-feedback .button { min-height: 30px; padding: 4px 8px; flex: none; font-size: .84rem; }

@media (max-width: 790px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(246px, 34%); gap: 10px; }
  .viewer-bar, .viewer-footer { padding-inline: 8px; }
  #file-size { display: none; }
}
@media (max-width: 640px) {
  .topbar-inner { min-height: 54px; }
  .privacy { font-size: .78rem; }
  .intro { align-items: start; flex-direction: column; padding: 18px 0 14px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .viewport { height: min(57vh, 520px); min-height: 310px; }
  .editor { max-height: none; }
  .empty-list { min-height: 155px; }
  .editor-body { max-height: 400px; }
  #file-size { display: inline; }
}

@media (max-width: 680px), (max-width: 950px) and (max-height: 540px) and (pointer: coarse) {
  body.mobile-editing { overflow: hidden; overscroll-behavior: none; }
  .mobile-editing .topbar, .mobile-editing .intro { display: none; }
  .mobile-editing main {
    height: var(--mobile-height, 100dvh);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .mobile-editing .workspace { display: flex; flex-direction: column; height: 100%; }
  .mobile-editing .viewer { flex: 1 1 0; min-height: 0; border: 0; border-radius: 0; }
  .mobile-editing .viewer-bar { order: 0; padding: 3px 8px; min-height: 48px; gap: 5px; }
  .mobile-editing .file-info, .mobile-editing #mask-tools { display: none; }
  .mobile-editing .viewer-bar .mobile-only { display: inline-flex; padding-inline: 9px; }
  .mobile-editing .viewer-bar .button, .mobile-editing .segmented button { min-height: 44px; }
  .mobile-editing .viewer-bar .segmented { padding: 0 2px; }
  .mobile-editing .viewer-bar .canvas-actions { justify-content: center; flex-wrap: nowrap; }
  .mobile-editing .selection-feedback { order: 1; min-height: 0; padding: 6px 9px; }
  .mobile-editing #mobile-status:not(:empty) { display: block; order: 1; padding: 5px 9px; border-bottom: 1px solid var(--line); }
  .mobile-editing .selection-feedback .button { min-height: 44px; }
  .mobile-editing .viewport { order: 2; flex: 1 1 0; min-height: 0; height: auto; touch-action: none; overscroll-behavior: contain; }
  .mobile-editing .image-stage { padding: 12px; }
  .mobile-editing .viewer-footer { order: 3; min-height: 44px; padding: 0 8px; font-size: .79rem; }
  .mobile-editing .zoom button { min-height: 44px; min-width: 44px; }
  .mobile-editing .marker::after { content: ''; position: absolute; inset: -8px; }
  .mobile-editing .frame-handle::after { inset: -7px; }
  .mobile-editing .mask-controls { order: 4; flex: none; justify-content: center; gap: 4px 8px; padding: 4px 6px; }
  .mobile-editing .mobile-mask-mode { display: inline-flex; background: white; }
  .mobile-editing .mask-controls .segmented { padding: 0 2px; }
  .mobile-editing .mask-controls button { min-width: 44px; min-height: 44px; }
  .mobile-editing .mask-controls input[type="range"] { width: clamp(64px, 22vw, 132px); min-height: 32px; }
  .mobile-editing .editor-shell {
    display: flex; flex: none; flex-direction: column; overflow: hidden;
    height: 27px;
    max-height: 367px; border-top: 1px solid var(--line); border-radius: 10px 10px 0 0; background: var(--paper);
    transition: height 180ms ease-out;
  }
  .mobile-editing .mobile-list-open .editor-shell { height: min(44% + 27px, 367px); }
  .mobile-editing .editor-shell.sheet-dragging {
    height: clamp(27px, calc(var(--editor-drag-height, 0px) + 27px), 44% + 27px); transition: none;
  }
  .mobile-editing .mobile-sheet-grip {
    display: grid; place-items: center; flex: 0 0 26px; width: 100%; padding: 0;
    border: 0; background: transparent; touch-action: none; cursor: ns-resize; user-select: none;
  }
  .mobile-sheet-grip::before { content: ''; width: 42px; height: 4px; border-radius: 4px; background: #bcaea6; }
  .mobile-sheet-grip:active::before { background: #87372b; }
  .mobile-sheet-grip:focus-visible { outline-offset: -3px; }
  .mobile-editing .editor { flex: 1 1 0; min-height: 0; max-height: none; border: 0; border-radius: 0; }
  .mobile-editing .editor[inert] { visibility: hidden; transition: visibility 0s 180ms; }
  .mobile-editing .sheet-dragging .editor[inert] { visibility: visible; transition: none; }
  .mobile-editing .editor-head { padding: 2px 9px; }
  .mobile-editing #placement-mode, .mobile-editing .editor-footer { display: none; }
  .mobile-editing .editor-body { max-height: none; overscroll-behavior: contain; }
  .mobile-editing .empty-list { min-height: 70px; padding: 8px; }
  .mobile-editing .empty-bubble { display: none; }
  .mobile-editing .mark-list { padding: 7px; }
  .mobile-editing .mark-row textarea { font-size: 16px; }
  .mobile-editing .mark-row .text-transform { display: none; }
  .mobile-editing .mark-row button { min-height: 40px; }
  .mobile-editing .mark-row .adjust, .mobile-editing .mark-row .remove { min-height: 44px; min-width: 44px; }
  .mobile-editing .mobile-tools { display: grid; flex: none; gap: 4px; padding: 3px 6px; border-top: 1px solid var(--line); background: var(--paper); }
  .mobile-editing .mobile-mask-active .mobile-tools,
  .mobile-editing .mobile-mask-active .editor-shell,
  .mobile-editing .mobile-keyboard .mobile-tools,
  .mobile-editing .mobile-keyboard .selection-feedback,
  .mobile-editing .mobile-keyboard .viewer-footer { display: none; }
  .mobile-editing .mobile-keyboard.mobile-list-open .editor-shell { height: min(55% + 27px, 367px); }
  .mobile-context, .mobile-workspaces { display: flex; gap: 5px; }
  .mobile-context:not(:has(> :not([hidden]))) { display: none; }
  .mobile-context > button { flex: 1; min-width: 0; min-height: 44px; padding: 5px 7px; }
  .mobile-workspaces > button {
    flex: 1; min-width: 0; min-height: 44px; padding: 3px 4px; border: 1px solid var(--line);
    border-radius: 7px; background: var(--paper); color: var(--ink); font-size: .875rem; white-space: nowrap;
  }
  .mobile-workspaces button[aria-pressed="true"], .mobile-workspaces button[aria-expanded="true"] {
    color: #87372b; background: var(--wash); border-color: #d29686; font-weight: 650;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-editing .editor-shell, .mobile-editing .editor[inert] { transition: none; }
}

@media (max-width: 950px) and (max-height: 540px) and (orientation: landscape) and (pointer: coarse) {
  .mobile-editing .workspace { display: grid; grid-template: minmax(0, 1fr) auto auto / minmax(0, 1fr); }
  .mobile-editing .workspace.mobile-list-open { grid-template-columns: minmax(0, 1fr) minmax(220px, 38%); }
  .mobile-editing .viewer { grid-column: 1; grid-row: 1; }
  .mobile-editing .editor-shell, .mobile-editing .editor-shell.sheet-dragging {
    grid-column: 1 / -1; grid-row: 2; height: 27px; max-height: none; transition: none;
  }
  .mobile-editing .mobile-list-open .editor-shell,
  .mobile-editing .mobile-keyboard.mobile-list-open .editor-shell { grid-column: 2; grid-row: 1; height: auto; }
  .mobile-editing .mobile-tools { grid-column: 1 / -1; grid-row: 3; grid-template-columns: minmax(180px, 1fr) minmax(230px, 1fr); }
  .mobile-editing .mobile-workspaces { grid-column: 2; }
  .mobile-editing .selection-feedback span { display: none; }
}
