.mobile-actions, .tools-toggle, .mobile-instruction { display: none; }
#tools-panel { margin: 0; font-size: inherit; }
#undo-work {
  border: 1px solid var(--border); background: white; color: var(--green);
  border-radius: 6px; padding: 6px 10px; font-size: 11px;
}

@media screen and (max-width: 760px) {
  main { padding: 18px 12px calc(100px + env(safe-area-inset-bottom)); }
  .intro { margin-bottom: 16px; }
  .intro .eyebrow, .intro > p:last-child { display: none; }
  h1 { font-size: 26px; }
  .mobile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .mobile-actions button {
    border: 1px solid var(--border); border-radius: 8px; padding: 10px;
    background: white; color: var(--green); font-weight: 650;
  }
  #mobile-save { background: var(--green); color: white; }
  #mobile-save-state { grid-column: 1 / -1; margin: 0; min-height: 18px; font-size: 12px; color: var(--muted); }
  .studio { display: block; }
  .tools {
    display: block; position: fixed; inset: auto 0 0; z-index: 10;
    padding: 0 0 env(safe-area-inset-bottom); border: 1px solid var(--border);
    border-radius: 16px 16px 0 0; background: white; box-shadow: 0 -6px 24px #273c3515;
  }
  .tools-toggle {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; min-height: 64px; padding: 16px 20px; list-style: none;
  }
  .tools-toggle::-webkit-details-marker { display: none; }
  .tools-toggle::after { content: '열기 ▴'; white-space: nowrap; }
  #tools-panel[open] > .tools-toggle::after { content: '닫기 ▾'; }
  .tools-toggle strong { color: var(--ink); font-size: 15px; }
  #mobile-current { flex: 1; font-size: 13px; text-align: right; }
  #editor-controls {
    display: block; width: 100%; max-height: min(60dvh, 560px);
    padding: 12px 20px 20px; overflow-y: auto; overscroll-behavior: contain;
  }
  .tool-section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
  .section-title { margin-bottom: 14px; }
  .palette { grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 10px; }
  .swatch { width: 44px; height: 44px; font-size: 16px; }
  button, select, input:not([type=file]) { min-width: 44px; min-height: 44px; font-size: 16px; }
  .account button, #undo-work, #print-work, #refresh-works, #more-works, .paint-button { min-height: 44px; font-size: 14px; }
  #work-title, #color-count, #page, #segment { font-size: 16px; }
  summary:not(.tools-toggle) { min-height: 44px; padding: 12px 0; font-size: 14px; }
  .saved-work { padding: 12px; font-size: 14px; }
  .saved-panel label, .count-row, .explain { font-size: 14px; }
  .hint, .file-name { font-size: 12px; }
  .desktop-instruction { display: none; }
  .mobile-instruction { display: inline; }
  .canvas-toolbar { height: auto; min-height: 56px; padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .canvas-toolbar > div:last-child { margin-left: auto; }
  .paper-area { min-height: 340px; padding: 12px; }
  .empty { min-height: 320px; }
  .empty h2 { font-size: 16px; }
  .empty p { margin-bottom: 24px; }
  .empty-art { width: 64px; height: 64px; }
  canvas { max-height: 60svh; }
  #order-legend { padding: 14px 12px; }
  #legend-items { gap: 8px 12px; }
  .statusbar { padding: 12px; }
  .statusbar p { font-size: 12px; }
}
