/* ================= 基础与变量 ================= */
:root {
  --paper: #f2f0e6;
  --ink: #2b2b2b;
  --ink-light: #8a8a8a;
  --cinnabar: #b33e36;
  --line: #d0ccc0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--paper);
  background-image: radial-gradient(var(--line) 0.5px, transparent 0.5px);
  background-size: 20px 20px;
  color: var(--ink);
  font-family: 'Songti SC', 'STSong', 'SimSun', serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  overflow-x: hidden;
}

/* ================= 主容器 ================= */
.minimal-container {
  width: min(880px, 100%);
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
}
.header-area { display: flex; flex-direction: column; gap: 16px; }

.title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 20px;
  text-indent: 20px;
  color: var(--ink);
}

/* ================= 模式切换 ================= */
.mode-tabs { display: flex; justify-content: center; gap: 30px; }
.mode-tab {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 4px;
  color: var(--ink-light);
  cursor: pointer;
  padding: 6px 4px;
  position: relative;
  transition: color 0.3s;
}
.mode-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--cinnabar);
  transition: all 0.3s;
  transform: translateX(-50%);
}
.mode-tab.active { color: var(--cinnabar); }
.mode-tab.active::after { width: 100%; }

/* ================= 顶部控制栏 ================= */
.top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  flex-wrap: wrap;
  gap: 15px;
}
.status-area {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
  color: var(--ink-light);
  letter-spacing: 1px;
}
.octave-indicator {
  color: var(--cinnabar);
  border: 1px solid var(--cinnabar);
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 0.8rem;
  font-family: monospace;
}

/* ================= 按钮 ================= */
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 5px 10px;
  transition: all 0.3s ease;
  letter-spacing: 2px;
  position: relative;
}
.btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.btn:hover::after { width: 100%; }
.btn:disabled { color: var(--line); cursor: not-allowed; }
.btn:disabled::after { display: none; }
.btn-record { color: var(--cinnabar); }
.btn-record::after { background: var(--cinnabar); }
.btn-record.active { color: var(--cinnabar); font-weight: bold; }
.btn-harmony { color: var(--cinnabar); border: 1px solid var(--cinnabar); border-radius: 2px; }
.btn-harmony.active { background: var(--cinnabar); color: var(--paper); }

/* ================= 曲谱粘贴面板 ================= */
.clipboard-panel {
  display: none;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}
.clipboard-panel.show { display: flex; }
.data-area {
  width: 100%;
  height: 70px;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--line);
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--ink-light);
  resize: vertical;
  outline: none;
}

/* ================= 抚琴：弦 ================= */
.strings-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  padding: 15px 0;
}
.string-row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  cursor: pointer;
  position: relative;
  user-select: none;
}
.string-key {
  width: 40px;
  font-size: 0.85rem;
  color: var(--line);
  font-family: monospace;
  text-align: center;
}
.string-svg-wrapper {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
}
.string-svg { width: 100%; height: 100%; overflow: visible; }
.string-base {
  fill: none;
  stroke: var(--ink-light);
  stroke-width: 1.5;
  transition: stroke 0.1s;
}
.string-row.hit .string-base { stroke: var(--cinnabar); }
.string-row.hit .string-label { color: var(--cinnabar); font-weight: bold; }
.string-label {
  width: 40px;
  font-size: 1.2rem;
  color: var(--ink-light);
  text-align: center;
  transition: color 0.2s;
}

/* ================= 编曲模式 ================= */
.arrange-panel { display: none; flex-direction: column; gap: 14px; }
.arrange-panel.show { display: flex; }
.arrange-hint {
  font-size: 0.8rem;
  color: var(--ink-light);
  letter-spacing: 1px;
  text-align: center;
}
.arrange-hint b { color: var(--cinnabar); font-weight: normal; }

.grid-wrap {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  touch-action: none;
}
.grid-canvas {
  display: block;
  width: 100%;
  height: 300px;
  cursor: crosshair;
}
.grid-canvas.drawing { cursor: grabbing; }

/* 画笔库 */
.brush-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--line);
}
.brush-bar-label {
  font-size: 0.8rem;
  color: var(--ink-light);
  letter-spacing: 2px;
  margin-right: 4px;
}
.brush-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 0.78rem;
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.5);
  user-select: none;
}
.brush-chip:hover { border-color: var(--ink-light); }
.brush-chip.active {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
  background: rgba(179, 62, 54, 0.06);
  box-shadow: 0 0 0 2px rgba(179, 62, 54, 0.15);
}
.brush-chip.used .brush-dot { opacity: 0.5; }
.brush-chip-status { font-size: 0.65rem; opacity: 0.7; margin-left: 2px; }
.brush-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.brush-chip-x { font-size: 0.9rem; line-height: 1; color: var(--line); padding: 0 2px; }
.brush-chip-x:hover { color: var(--cinnabar); }
.brush-empty { font-size: 0.78rem; color: var(--line); font-style: italic; }

/* 编曲工具栏 */
.arrange-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--ink-light);
}
.arrange-toolbar input[type=number] {
  width: 66px;
  font-family: monospace;
  font-size: 0.8rem;
  padding: 3px 5px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  outline: none;
}
.arrange-toolbar label { display: flex; align-items: center; gap: 5px; letter-spacing: 1px; }
.arrange-toolbar select {
  font-family: monospace;
  padding: 3px;
  border: 1px solid var(--line);
  background: transparent;
}
.toolbar-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

/* ================= 弹窗（毛玻璃遮罩 + 居中） ================= */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(242, 240, 230, 0.35);
  -webkit-backdrop-filter: blur(6px) saturate(0.9);
  backdrop-filter: blur(6px) saturate(0.9);
  justify-content: center;
  align-items: center;
}
.modal-mask.show { display: flex; }

.modal-box {
  width: min(440px, 90vw);
  max-height: 80vh;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 12px 40px rgba(43, 43, 43, 0.18), 0 2px 8px rgba(43, 43, 43, 0.08);
  padding: 24px 26px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalIn 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-title {
  font-size: 0.95rem;
  letter-spacing: 5px;
  color: var(--ink);
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.modal-sub {
  font-size: 0.75rem;
  color: var(--ink-light);
  letter-spacing: 1px;
  text-align: center;
  margin-top: -6px;
}

/* 八度选择网格 */
.oct-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.oct-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--ink-light);
  padding: 9px 2px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.oct-btn .oct-num {
  font-family: monospace;
  font-size: 1rem;
  color: var(--ink);
}
.oct-btn:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.oct-btn:hover .oct-num { color: var(--cinnabar); }
.oct-btn.sel {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
  background: rgba(179, 62, 54, 0.06);
}
.oct-btn.sel .oct-num { color: var(--cinnabar); }

/* 弹窗按钮 */
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 4px;
}
.modal-btn {
  background: transparent;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 2px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--ink-light);
  border-radius: 2px;
}
.modal-btn:hover { border-color: var(--ink); color: var(--ink); }
.modal-btn.confirm { border-color: var(--cinnabar); color: var(--cinnabar); }
.modal-btn.confirm:hover { background: var(--cinnabar); color: var(--paper); }
.modal-btn:disabled { border-color: var(--line); color: var(--line); cursor: not-allowed; }
.modal-btn.confirm:disabled { border-color: var(--line); color: var(--line); }

/* 命名输入框 */
.name-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  outline: none;
  letter-spacing: 1px;
}
.name-input:focus { border-color: var(--cinnabar); }
.name-input::placeholder { color: var(--line); }

/* 作品库列表 */
.save-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
.save-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
}
.save-item:hover { border-color: var(--ink-light); }
.save-item-main { flex: 1; min-width: 0; cursor: pointer; }
.save-item-name {
  font-size: 0.86rem;
  color: var(--ink);
  letter-spacing: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.save-item-meta {
  font-size: 0.68rem;
  color: var(--ink-light);
  font-family: monospace;
  margin-top: 2px;
}
.save-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.save-mini-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.72rem;
  color: var(--ink-light);
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
}
.save-mini-btn:hover { border-color: var(--ink); color: var(--ink); }
.save-mini-btn.del:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.save-empty {
  font-size: 0.8rem;
  color: var(--line);
  text-align: center;
  padding: 24px 0;
  font-style: italic;
}

/* ================= 侧边调音面板 ================= */
.config-toggle-btn {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-right: none;
  padding: 15px 10px;
  cursor: pointer;
  writing-mode: vertical-rl;
  font-family: inherit;
  letter-spacing: 5px;
  color: var(--ink-light);
  border-radius: 4px 0 0 4px;
  z-index: 100;
  transition: all 0.3s;
}
.config-toggle-btn:hover { color: var(--cinnabar); border-color: var(--cinnabar); }

.side-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.05);
  z-index: 101;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow-y: auto;
}
.side-panel.open { right: 0; }
.side-panel h3 {
  font-size: 1.05rem;
  font-weight: normal;
  color: var(--ink);
  letter-spacing: 5px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.param-group { display: flex; flex-direction: column; gap: 10px; }
.param-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-light);
}
.param-name { letter-spacing: 2px; }
.param-val { font-family: monospace; color: var(--cinnabar); }

input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  cursor: pointer;
  background: var(--line);
}
input[type=range]::-webkit-slider-thumb {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: var(--cinnabar);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -5px;
  box-shadow: 0 0 5px rgba(179, 62, 54, 0.4);
}

.close-panel-btn {
  margin-top: auto;
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px;
  color: var(--ink-light);
  cursor: pointer;
  font-family: inherit;
}
.close-panel-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ============================================================
 * 移动端 / 触屏适配
 * 由 app.js 检测到触屏设备或窄屏时，给 <html> 加 .mobile-ui 类。
 * 桌面端不带这个 class，所以下面所有规则都不会影响电脑上的原样。
 * ============================================================ */

/* 八度加减条（桌面隐藏，触屏显示） */
.oct-touch-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.45);
}
.oct-step-btn {
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  width: 54px;
  height: 34px;
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.oct-step-btn:active {
  background: rgba(179, 62, 54, 0.1);
  border-color: var(--cinnabar);
  color: var(--cinnabar);
}
.oct-step-btn:disabled { color: var(--line); border-color: var(--line); background: transparent; }
.oct-step-btn:disabled:active { background: transparent; border-color: var(--line); color: var(--line); }
.oct-touch-label {
  font-size: 0.75rem;
  letter-spacing: 5px;
  color: var(--ink-light);
  flex: 1;
  text-align: center;
}

/* 触屏扫弦提示（默认不显示） */
.touch-hint {
  display: none;
  font-size: 0.72rem;
  color: var(--ink-light);
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.6;
  padding-top: 2px;
}

@media (max-width: 600px) and (hover: hover) {
  /* 窄屏桌面浏览器也给一点呼吸空间，但不改交互 */
  .minimal-container { width: 100%; }
}

html.mobile-ui { -webkit-text-size-adjust: 100%; }

/* ---------- 页面骨架 ---------- */
html.mobile-ui body {
  align-items: flex-start;
  min-height: 100vh;
  padding: max(16px, env(safe-area-inset-top)) 12px max(24px, env(safe-area-inset-bottom));
}
@supports (height: 100dvh) {
  html.mobile-ui body { min-height: 100dvh; }
}

html.mobile-ui .minimal-container { gap: 16px; width: 100%; }
html.mobile-ui .title { font-size: 1.15rem; letter-spacing: 12px; text-indent: 12px; }
html.mobile-ui .mode-tabs { gap: 26px; }
html.mobile-ui .mode-tab { font-size: 0.95rem; padding: 6px 2px; }

/* ---------- 顶部控制栏 ---------- */
html.mobile-ui .top-controls {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
}
html.mobile-ui .status-area {
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
}
html.mobile-ui .oct-touch-bar { display: flex; }
html.mobile-ui .oct-step-btn { width: 64px; height: 42px; font-size: 1.2rem; }
html.mobile-ui .btn-group { width: 100%; gap: 7px; justify-content: flex-start; }
html.mobile-ui .btn {
  font-size: 0.82rem;
  padding: 8px 10px;
  min-height: 36px;
  letter-spacing: 1px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.45);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex: 0 0 auto;
}
html.mobile-ui .btn::after { display: none; }          /* 触屏没有 hover，去掉下划线动画 */
html.mobile-ui .btn:active {
  background: rgba(179, 62, 54, 0.08);
  border-color: var(--cinnabar);
  color: var(--cinnabar);
}
html.mobile-ui .btn:disabled { background: transparent; border-color: var(--line); }
html.mobile-ui .btn-harmony,
html.mobile-ui .btn-record { border-color: currentColor; }

/* ---------- 曲谱粘贴 ---------- */
html.mobile-ui .clipboard-panel { padding: 14px; gap: 10px; }
html.mobile-ui .data-area { height: 88px; font-size: 16px; }   /* 16px 防 iOS 聚焦自动放大 */

/* ---------- 琴弦：加大触区 + 支持扫弦 ---------- */
html.mobile-ui .strings-container {
  gap: 8px;
  padding: 6px 0 12px;
  touch-action: none;
  overscroll-behavior: contain;
}
html.mobile-ui .string-row {
  height: 52px;
  -webkit-tap-highlight-color: transparent;
}
html.mobile-ui .string-key { display: none; }          /* 手机上键盘提示字母没用 */
html.mobile-ui .string-label { width: 48px; font-size: 1.35rem; }
html.mobile-ui .string-row.hit { background: rgba(179, 62, 54, 0.05); }
html.mobile-ui .touch-hint { display: block; }

/* ---------- 编曲 ---------- */
html.mobile-ui .arrange-panel { gap: 10px; }
html.mobile-ui .arrange-hint { font-size: 0.73rem; text-align: left; line-height: 1.7; }
html.mobile-ui .brush-bar { gap: 8px; padding: 6px 0; }
html.mobile-ui .brush-chip { padding: 6px 10px 6px 8px; font-size: 0.8rem; }
html.mobile-ui .brush-chip-x { font-size: 1.1rem; padding: 2px 6px; }
html.mobile-ui .grid-canvas { height: 260px; }
html.mobile-ui .arrange-toolbar {
  gap: 8px;
  justify-content: flex-start;
  font-size: 0.8rem;
  width: 100%;
}
html.mobile-ui .arrange-toolbar label { flex: 1 1 100%; justify-content: space-between; padding: 2px 0; }
html.mobile-ui .arrange-toolbar input[type=number] {
  width: 96px;
  height: 34px;
  font-size: 16px;
  padding: 4px 8px;
}
html.mobile-ui .arrange-toolbar .btn {
  min-height: 36px;
  flex: 1 1 40%;
  text-align: center;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.45);
}
html.mobile-ui .toolbar-sep { display: none; }

/* ---------- 弹窗 ---------- */
html.mobile-ui .modal-box {
  width: min(92vw, 400px);
  max-height: 78vh;
  padding: 18px 16px 14px;
  gap: 12px;
}
html.mobile-ui .oct-grid { gap: 6px; }
html.mobile-ui .oct-btn { padding: 12px 2px; min-height: 54px; }
html.mobile-ui .modal-actions { gap: 10px; }
html.mobile-ui .modal-actions .modal-btn { flex: 1; min-height: 42px; padding: 10px 8px; font-size: 0.85rem; }
html.mobile-ui .name-input { font-size: 16px; padding: 11px 12px; }
html.mobile-ui .save-list { max-height: 46vh; }
html.mobile-ui .save-item { padding: 11px 10px; }
html.mobile-ui .save-mini-btn { padding: 8px 11px; font-size: 0.78rem; }

/* ---------- 调音侧栏 ---------- */
html.mobile-ui .side-panel {
  width: min(78vw, 320px);
  right: calc(-1 * min(78vw, 320px));
  height: 100vh;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  gap: 20px;
}
@supports (height: 100dvh) {
  html.mobile-ui .side-panel { height: 100dvh; }
}
html.mobile-ui .side-panel.open { right: 0; }
html.mobile-ui .config-toggle-btn {
  top: 8px;
  transform: none;
  padding: 9px 7px;
  font-size: 0.78rem;
  letter-spacing: 4px;
  border-radius: 4px 0 0 4px;
  transition: color 0.2s, border-color 0.2s;
}
html.mobile-ui .param-group { gap: 8px; }
html.mobile-ui input[type=range]::-webkit-slider-runnable-track { height: 4px; }
html.mobile-ui input[type=range]::-webkit-slider-thumb { height: 20px; width: 20px; margin-top: -8px; }
html.mobile-ui .close-panel-btn { padding: 13px; font-size: 0.9rem; }

/* ---------- 横屏手机：压缩纵向尺寸，尽量一屏放下 ---------- */
html.mobile-ui.landscape body { padding-top: 8px; padding-bottom: 8px; }
html.mobile-ui.landscape .minimal-container { gap: 8px; }
html.mobile-ui.landscape .title { font-size: 0.95rem; letter-spacing: 8px; text-indent: 8px; }
html.mobile-ui.landscape .mode-tabs { gap: 20px; }
html.mobile-ui.landscape .mode-tab { font-size: 0.82rem; padding: 2px; }
html.mobile-ui.landscape .top-controls { gap: 6px; }
html.mobile-ui.landscape .oct-step-btn { height: 34px; width: 56px; font-size: 1rem; }
html.mobile-ui.landscape .oct-touch-bar { padding: 2px 10px; }
html.mobile-ui.landscape .btn-group { gap: 6px; }
html.mobile-ui.landscape .btn { min-height: 30px; padding: 4px 8px; font-size: 0.76rem; }
html.mobile-ui.landscape .strings-container { gap: 5px; padding: 2px 0 4px; }
html.mobile-ui.landscape .string-row { height: 36px; }
html.mobile-ui.landscape .string-label { font-size: 1.1rem; }
html.mobile-ui.landscape .touch-hint { display: none; }
html.mobile-ui.landscape .grid-canvas { height: 200px; }
