:root {
  --bg: #ffffff;
  --band: #f5f5f7;
  --fill: #f2f2f4;
  --fill-strong: #e8e8ed;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --text: #424245;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .1);
  --line-strong: rgba(0, 0, 0, .16);
  --accent: #3a3fbd;
  --accent-ink: #ffffff;
  --accent-soft: #eef0ff;
  --thumb: #ffffff;
  --glass: rgba(255, 255, 255, .72);
  --must: #b81c23;
  --must-soft: #fbeeec;
  --suggest: #8f5600;
  --suggest-soft: #fbf3e4;
  --ok: #1d7a4c;
  --ok-soft: #e9f5ef;
  --paper: #ffffff;
  --radius: 10px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101012;
    --band: #1c1c1e;
    --fill: #2c2c2e;
    --fill-strong: #3a3a3c;
    --surface: #1c1c1e;
    --ink: #f5f5f7;
    --text: #d2d2d7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, .12);
    --line-strong: rgba(255, 255, 255, .2);
    --accent: #a5a9ff;
    --accent-ink: #14163a;
    --accent-soft: #262a55;
    --thumb: #4a4a4d;
    --glass: rgba(28, 28, 30, .92);
    --must: #ff8a75;
    --must-soft: #40231d;
    --suggest: #eab363;
    --suggest-soft: #3a2d17;
    --ok: #6fd3a0;
    --ok-soft: #1a3429;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { color: var(--ink); font-size: clamp(1.4rem, 2.6vw, 1.75rem); line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; line-height: 1.35; font-weight: 700; color: var(--ink); letter-spacing: -.005em; }
h3 { font-size: 1rem; line-height: 1.4; font-weight: 700; color: var(--ink); }
button, select, input { font: inherit; color: inherit; }

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--line);
}
.brand { border: 0; background: none; padding: 0; font-weight: 700; white-space: nowrap; cursor: pointer; }
.steps { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; overflow-x: auto; scrollbar-width: none; }
.steps li { white-space: nowrap; font-size: .85rem; color: var(--muted); padding: 2px 8px; border-radius: 99px; }
.steps li.now { color: var(--accent); font-weight: 700; }
.steps li.done { color: var(--ink); }
@media (max-width: 640px) {
  .top { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 16px; }
  .steps { margin: 0; width: 100%; }
  .steps li { padding: 2px 6px; font-size: .8rem; }
}

main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 110px; }
.narrow { max-width: 640px; margin: 0 auto; display: grid; gap: 16px; }
.card { background: var(--surface); border: .5px solid var(--line-strong); border-radius: var(--radius-lg); padding: 20px; display: grid; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 20px;
  border-radius: 12px; border: 0; color: var(--ink);
  background: var(--fill); cursor: pointer; white-space: nowrap; text-decoration: none; font-weight: 600;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.btn:hover { background: var(--fill-strong); }
.btn:active { transform: scale(.97); transition-duration: 60ms; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.primary { min-height: 50px; padding: 8px 28px; background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent); opacity: .9; transform: translateY(-1px); }
/* 小按鈕和選項：淺灰填色，選中時變深 */
.btn.sm { min-height: 40px; padding: 4px 12px; font-size: .9rem; border-radius: var(--radius); }
.btn.on, .btn.on:hover { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--fill); border-radius: var(--radius); }
.seg button { border: 0; background: transparent; padding: 6px 14px; min-height: 40px; border-radius: 8px; cursor: pointer; white-space: nowrap; font-weight: 600; }
.seg button.on { background: var(--thumb); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }

label.field { display: grid; gap: 4px; }
label.field > span { font-size: .9rem; font-weight: 600; }
select, input[type="number"] {
  min-height: 44px; padding: 8px 10px; width: 100%;
  border: .5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.drop {
  display: grid; gap: 10px; place-items: center; text-align: center;
  padding: 32px 16px; border: 0; border-radius: var(--radius-lg);
  background: var(--band); cursor: pointer;
}
.drop:hover, .drop.over { background: var(--fill-strong); }

.notice { padding: 12px 14px; border-radius: var(--radius); font-size: .925rem; background: var(--accent-soft); }
.notice.must { background: var(--must-soft); color: var(--must); }
.notice.suggest { background: var(--suggest-soft); color: var(--suggest); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

.work { display: grid; gap: 16px; }
@media (min-width: 960px) {
  .work { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .side { position: sticky; top: 72px; max-height: calc(100vh - 150px); overflow-y: auto; }
}
.side { display: grid; gap: 12px; align-content: start; }

/* 樂譜紙：深色模式也維持白底，譜才清楚 */
.paper { background: var(--paper); color: #111; border: .5px solid var(--line-strong); border-radius: var(--radius-lg); padding: 8px; overflow: hidden; min-height: 200px; }
.paper svg { display: block; width: 100%; height: auto; }
.paper .pagegap { height: 8px; }
.paper .loading { color: #555; padding: 40px 0; text-align: center; }
.paper g.note, .paper g.rest { cursor: pointer; }
.paper g.measure.mark-must rect.mark-bg { fill: #fbdcd5; }
.paper g.measure.mark-suggest rect.mark-bg { fill: #fbeccb; }
.paper g.measure.mark-now rect.mark-bg { stroke: #1d1d1f; stroke-width: 10; }
.paper g.selected, .paper g.selected * { fill: #1f6fe0 !important; stroke: #1f6fe0; }
.paper g.playing, .paper g.playing * { fill: #0d9a5f !important; }
.paper g.shifted, .paper g.shifted * { fill: #7a3fc2; }

.issue { display: grid; gap: 6px; padding: 12px 14px; border: 0; border-radius: 12px; text-align: left; background: var(--band); width: 100%; }
button.issue { cursor: pointer; }
.issue.must { background: var(--must-soft); }
.issue.suggest { background: var(--suggest-soft); }
.issue.now { outline: 1.5px solid var(--accent); outline-offset: -1.5px; }
.tag { font-size: .8rem; font-weight: 700; white-space: nowrap; }
.tag.must { color: var(--must); }
.tag.suggest { color: var(--suggest); }
.list { display: grid; gap: 8px; }

.editor {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: .5px solid var(--line-strong); border-radius: 18px 18px 0 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: grid; gap: 8px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .12);
  max-height: 60vh; overflow-y: auto;
}
.editor .inner { max-width: 1180px; width: 100%; margin: 0 auto; display: grid; gap: 8px; }
.editor .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.bar .inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 40;
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 8px;
  background: var(--ink); color: var(--bg); font-size: .925rem;
}
.summary { display: grid; gap: 4px; }
.summary b { font-weight: 700; }
.dl { display: grid; gap: 0; }
.dl .btn { justify-content: space-between; text-align: left; white-space: normal; padding: 12px 18px; min-height: 60px; border-radius: 0; font-weight: 600; background: var(--band); position: relative; }
.dl .btn:hover { background: var(--fill-strong); }
.dl .btn:active { transform: none; }
.dl .btn::after { content: "↓"; color: var(--muted); font-weight: 400; margin-left: 12px; }
.dl .btn.primary { border-radius: 16px; background: var(--accent); color: var(--accent-ink); margin-bottom: 10px; min-height: 68px; }
.dl .btn.primary::after { color: inherit; }
.dl .btn.primary small { color: inherit; opacity: .72; }
.dl .btn.primary + .btn { border-radius: 16px 16px 0 0; }
.dl .btn:last-child { border-radius: 0 0 16px 16px; }
.dl .btn:not(.primary) + .btn:not(.primary)::before { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: .5px; background: var(--line-strong); }
.dl .btn span { display: block; }
.dl small { color: var(--muted); font-weight: 400; display: block; font-size: .825rem; }

/* 手機和平板：操作和標記放在譜的上面，不用滑過整份譜才找得到 */
@media (max-width: 959px) {
  .side { order: -1; }
}
.notice, .issue > span, .card > p, .narrow > div > p, .narrow > p { text-wrap: balance; }
.summary span { text-wrap: balance; }

/* 原譜對照 */
.scores { display: grid; gap: 12px; min-width: 0; }
.orig { background: var(--surface); border: .5px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden; }
.orig-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: .5px solid var(--line); }
.orig-scroll { position: relative; height: 38vh; min-height: 220px; overflow: auto; background: #fff; }
.orig-scroll > p { padding: 12px; }
.orig-page { position: relative; width: 100%; }
.orig-page img { display: block; width: 100%; height: auto; }
.orig-band { position: absolute; left: 0; right: 0; height: 6%; transform: translateY(-50%); background: rgba(35, 31, 32, .1); border-top: 1px solid rgba(35, 31, 32, .5); border-bottom: 1px solid rgba(35, 31, 32, .5); pointer-events: none; }
.rest-input { width: 88px; }
.mark-input { width: 88px; min-height: 40px; padding: 4px 8px; border: .5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
input[type="text"], .mark-input { font: inherit; color: inherit; }
input.rest-input { width: 96px; }
input.mark-input { width: 96px; }

/* 拍號清單 */
.time-list { display: grid; gap: 10px; }
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: end; }
.time-at { grid-column: 1 / -1; font-weight: 600; font-size: .925rem; }
.time-row > .btn { grid-column: 1 / -1; justify-self: start; }
.time-add { border-top: 1px solid var(--line); padding-top: 12px; }
.time-add > .field:first-child { grid-column: 1 / -1; }
.time-box { display: grid; gap: 12px; margin-top: 8px; }
details.card > summary { cursor: pointer; font-weight: 600; min-height: 28px; }

/* 自動修正清單、每行小節數（功能 54、59） */
.line-row { width: 100%; text-align: left; justify-content: flex-start; }
#lines-box .list { max-height: 320px; overflow: auto; }
#fixes-box .list { margin: 8px 0; }

/* 一行一行校對（功能 60） */
.line-view { display: grid; gap: 12px; max-width: 980px; margin: 0 auto; padding-bottom: 96px; }
.line-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.line-head h2 { margin: 0; }
.line-orig { overflow: hidden; background: #fff; border: .5px solid var(--line-strong); border-radius: var(--radius-lg); min-height: 48px; }
.line-orig img { display: block; width: 100%; }
.line-orig p { padding: 12px; margin: 0; }

/* 修改面板：選項多的時候可以捲動，不會蓋住整個畫面 */
.editor { max-height: 60vh; overflow-y: auto; }
.editor details summary { cursor: pointer; padding: 6px 0; font-size: 14px; }
.editor details .row { margin-top: 8px; }

/* 手機沒有鍵盤，不顯示快速鍵說明（功能 66） */
.keys-hint { margin: 0; }
@media (hover: none), (max-width: 700px) { .keys-hint { display: none; } }

/* 修改面板的大按鈕也用小圓角，一排才整齊 */
.editor .btn:not(.sm) { border-radius: var(--radius); }

/* 首頁：一條跨滿畫面的五線譜就是主角 */
.home { display: grid; gap: clamp(36px, 6vw, 60px); max-width: 960px; margin: 0 auto; padding-top: clamp(4px, 3vw, 28px); }
.welcome { display: grid; gap: 12px; max-width: 34em; }
.welcome h1 { font-family: "Songti TC", "Noto Serif TC", "PMingLiU", serif; font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 600; line-height: 1.35; letter-spacing: .01em; }
.lead { color: var(--text); font-size: 1rem; line-height: 1.75; }
.stage { display: grid; gap: 10px; }
#hero-staff { display: block; width: 100vw; margin-left: calc(50% - 50vw); height: 230px; overflow: visible; color: var(--ink); }
.staff-line { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.staff-line.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-line 900ms ease-out forwards; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
.hero-note { fill: currentColor; transition: transform 560ms cubic-bezier(.3, 1.45, .5, 1); }
.settle { animation: settle 420ms cubic-bezier(.2, 1.3, .4, 1) backwards; }
@keyframes settle { from { opacity: 0; transform: translateY(-16px); } }
.words { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.words button { border: 0; background: none; padding: 8px 0; min-height: 44px; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; transition: color 160ms ease-out, border-color 160ms ease-out; }
.words button:hover { color: var(--ink); }
.words button.on { color: var(--accent); border-bottom-color: var(--accent); }
.demo-note { min-height: 1.6em; }
.start { display: grid; justify-items: start; gap: 8px; max-width: 34em; }
.start > .card, .start > .notice { width: 100%; }
.start .drop { width: 100%; justify-items: start; text-align: left; padding: 22px 22px; transition: background-color 160ms ease-out, transform 200ms cubic-bezier(.3, 1.4, .5, 1); }
.drop.over { transform: scale(1.015); }
.when-over { display: none; color: var(--accent); font-weight: 600; }
.drop.over .when-over { display: inline; }
.drop.over .when-idle { display: none; }
.link { border: 0; background: none; padding: 8px 0; color: var(--accent); font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }
.trio { display: grid; gap: 22px; }
.trio h3 { margin-bottom: 4px; font-weight: 600; }
.trio p { color: var(--text); }
@media (min-width: 640px) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
.fine { display: grid; gap: 6px; border-top: .5px solid var(--line-strong); padding-top: 18px; }
.fine p, .lead, .trio p { text-wrap: balance; }

/* 認譜等待：一顆音沿著譜線走 */
.reading { position: relative; height: 41px; background: repeating-linear-gradient(to bottom, var(--line-strong) 0 1px, transparent 1px 10px); overflow: hidden; }
.reading i { position: absolute; top: 12px; left: 0; width: 13px; height: 9px; border-radius: 50%; background: var(--accent); transform: rotate(-20deg); animation: read-along 5s linear infinite; }
@keyframes read-along { from { left: -16px; } to { left: 100%; } }

/* 頂部的進度線：跟著步驟往前 */
.top::after { content: ""; position: absolute; left: 0; bottom: -.5px; height: 2px; width: var(--progress, 20%); background: var(--accent); transition: width 420ms cubic-bezier(.2, .9, .3, 1); }

/* 系統要求少一點透明或動態時，換成實心、不縮放 */
@media (prefers-reduced-transparency: reduce) {
  .top, .bar { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
  .hero-note, .top::after, .start .drop { transition: none; }
  .staff-line.draw { animation: none; stroke-dashoffset: 0; }
  .settle { animation: none; }
  .reading i { animation: none; left: 45%; }
}

.editor .ed-select { width: auto; min-height: 40px; padding: 4px 8px; }

/* 超出音域的音 */
.paper g.out-range, .paper g.out-range * { fill: #d11a1a; stroke: #d11a1a; }

/* 超出音域的提醒排在轉調結果前面，手機上不用往下滑才看得到 */
.side > .card.summary { order: 2; }

/* 網站標誌 */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { display: block; width: 28px; height: 28px; }

a { color: var(--ink); }
/* 手機上一排放得下高低和三個臨時記號 */
.editor .btn:not(.sm) { padding: 8px 12px; }
@media (max-width: 480px) { .editor .btn[data-a] { min-width: 44px; padding: 8px 6px; } .editor .btn[data-d] { padding: 8px 10px; } }

/* 上傳前的提醒 */
.notice-dialog { width: min(480px, calc(100vw - 32px)); border: 0; border-radius: 20px; padding: 26px; background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
.notice-dialog::backdrop { background: rgba(20, 20, 40, .36); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.notice-dialog form { display: grid; gap: 16px; }
.notice-dialog h2 { font-family: "Songti TC", "Noto Serif TC", "PMingLiU", serif; font-size: 1.35rem; font-weight: 600; }
.notice-dialog section { display: grid; gap: 6px; }
.notice-dialog h3 { font-weight: 600; }
.notice-dialog p { font-size: .925rem; line-height: 1.7; text-wrap: pretty; }
.notice-skip { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.notice-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* 校對時原譜固定在上方，下面的譜可以捲動 */
.orig { position: sticky; top: calc(var(--top-h, 72px) + 8px); z-index: 12; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.orig-scroll { height: 30vh; min-height: 180px; }
@media (max-width: 959px) {
  .orig-scroll { height: 24vh; min-height: 130px; }
  body.editing .orig-scroll { height: 17vh; min-height: 100px; }
  .orig-head { padding: 2px 10px; }
}

/* 修改面板：電腦分欄一次看到，手機分頁 */
.editor { padding-top: 12px; }
.editor .head { flex-wrap: wrap; }
.ed-always { flex-wrap: nowrap; }
.ed-done { background: var(--accent); color: var(--accent-ink); }
.ed-done:hover { background: var(--accent); opacity: .9; }
.ed-tabs { display: none; }
.ed-panels { display: grid; gap: 10px 20px; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
.ed-panel { display: grid; gap: 6px; align-content: start; min-width: 0; }
.ed-panel h4 { margin: 0; font-size: .78rem; font-weight: 600; color: var(--muted); }
.ed-grid { display: grid; gap: 4px; }
.ed-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ed-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ed-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ed-grid .wide { grid-column: 1 / -1; }
.ed-panel .btn.sm { min-width: 0; padding: 4px 4px; min-height: 36px; font-size: .8rem; font-weight: 600; white-space: normal; line-height: 1.2; }
.ed-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 6px; align-items: end; }
.ed-fields label { display: grid; gap: 2px; color: var(--muted); }
.ed-fields .mark-input, .ed-fields .ed-select { width: 100%; min-height: 36px; font-size: .85rem; }
.editor .keys-hint { font-size: .75rem; }
@media (max-width: 1099px) { .ed-panels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 699px) {
  .editor { max-height: 44vh; padding-top: 8px; }
  .ed-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 2px; background: var(--fill); border-radius: var(--radius); }
  .ed-tabs button { border: 0; background: transparent; min-height: 36px; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--text); cursor: pointer; }
  .ed-tabs button.on { background: var(--thumb); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
  .ed-panels { display: block; margin-top: 2px; }
  .ed-panel { display: none; gap: 6px; }
  .ed-panel.active { display: grid; }
  .ed-panel h4 { display: none; }
  .ed-panel .btn.sm { min-height: 42px; font-size: .88rem; }
  .ed-panel .ed-grid .btn[data-d], .ed-panel .ed-grid .btn[data-a] { font-size: 1rem; }
}

/* 電腦上記號排成一列，面板才不會擠掉譜面 */
@media (min-width: 700px) {
  .ed-panels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ed-panel[data-panel="mark"] { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
  .ed-panel[data-panel="mark"] h4 { white-space: nowrap; }
  .ed-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
  .ed-fields label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .ed-fields .mark-input { width: 72px; }
  .ed-fields .ed-select { width: 104px; }
  .ed-panel[data-panel="mark"] .ed-grid.three { width: 210px; }
  .ed-fields .btn.sm { padding: 4px 10px; }
  body.editing .orig-scroll { height: 20vh; min-height: 120px; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .ed-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

