/* ============================================================
   Text Analyzer Pro – Stylesheet
   Inspired by: WordCounter.net
   Aesthetic: Clean editorial utility tool — warm white, forest
   green accents, precise mono counters, zero-fuss layout.
   Font stack: "Barlow" display + "JetBrains Mono" for counts.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
.tap-app {
  --bg:           #fafaf8;
  --surface:      #ffffff;
  --surface2:     #f3f3f0;
  --border:       #ddddd8;
  --border-focus: #2e7d52;
  --text:         #1a1a18;
  --text-muted:   #666660;
  --text-faint:   #aaaaaa;
  --accent:       #2e7d52;   /* forest green — functional, trustworthy */
  --accent-h:     #245f3f;
  --accent-pale:  #e8f5ee;
  --red:          #c0392b;
  --red-pale:     #fdf3f2;
  --yellow:       #d97706;
  --yellow-pale:  #fffbeb;
  --blue:         #1d6fa4;
  --blue-pale:    #eff6ff;
  --purple:       #6d28d9;
  --purple-pale:  #f5f3ff;
  --shadow-s:     0 1px 2px rgba(0,0,0,.06);
  --shadow-m:     0 2px 8px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-l:     0 8px 24px rgba(0,0,0,.1);
  --radius-s:     4px;
  --radius:       8px;
  --radius-l:     12px;
  --font:         'Barlow', system-ui, sans-serif;
  --mono:         'JetBrains Mono', ui-monospace, monospace;
  --ease:         cubic-bezier(.4,0,.2,1);
  --t:            .16s;

  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  max-width: 1100px;
  margin: 0 auto 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  overflow: hidden;
  position: relative;
}

/* ── Dark mode ─────────────────────────────────────────────── */
.tap-app.tap-dark {
  --bg:        #111110;
  --surface:   #1a1a18;
  --surface2:  #222220;
  --border:    #2e2e2c;
  --text:      #e8e8e4;
  --text-muted:#999990;
  --text-faint:#555550;
  --accent-pale:#1a3028;
  --red-pale:  #2a1210;
  --yellow-pale:#2a1e08;
  --blue-pale: #0e1e2e;
  --purple-pale:#1e1630;
  --shadow-s:  0 1px 2px rgba(0,0,0,.3);
  --shadow-m:  0 2px 8px rgba(0,0,0,.4);
}

/* ── Global Reset ──────────────────────────────────────────── */
.tap-app *, .tap-app *::before, .tap-app *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
}

/* ── Top bar: big word/char count display ──────────────────── */
.tap-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tap-count-display {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1;
}

.tap-count-display span {
  color: var(--accent);
  transition: color var(--t) var(--ease);
}

.tap-topbar-actions {
  display: flex;
  gap: 8px;
}

/* ── Editor ────────────────────────────────────────────────── */
.tap-editor-wrap {
  position: relative;
  background: var(--surface);
}

/* Highlight backdrop — sits behind textarea, same geometry */
.tap-highlight-backdrop {
  position: absolute;
  inset: 0;
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
  color: transparent;
  pointer-events: none;
  z-index: 1;
}

.tap-editor {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  min-height: 280px;
  max-height: 520px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  caret-color: var(--accent);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transition: background var(--t) var(--ease);
}

.tap-editor:focus { background: color-mix(in srgb, var(--accent) 2%, var(--surface)); }
.tap-editor::placeholder { color: var(--text-faint); font-style: italic; }

/* Grammar underline marks */
.tap-mark {
  border-radius: 2px;
  border-bottom: 2px wavy;
  cursor: pointer;
}
.tap-mark-spelling      { border-color: var(--red);    background: rgba(192,57,43,.07); }
.tap-mark-grammar       { border-color: var(--blue);   background: rgba(29,111,164,.07); }
.tap-mark-punctuation   { border-color: var(--yellow); background: rgba(217,119,6,.07); }
.tap-mark-capitalization{ border-color: var(--yellow); background: rgba(217,119,6,.07); }
.tap-mark-style         { border-color: var(--purple); background: rgba(109,40,217,.07); }

/* ── Toolbar ───────────────────────────────────────────────── */
.tap-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tap-toolbar-left, .tap-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Toggle switch */
.tap-toggle-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tap-toggle-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-muted);
  white-space: nowrap;
}

.tap-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 64px;
  height: 26px;
  padding: 0 4px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.tap-toggle--on {
  background: var(--accent);
  border-color: var(--accent);
}

.tap-toggle-knob {
  position: absolute;
  left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: left var(--t) var(--ease);
}

.tap-toggle--on .tap-toggle-knob { left: calc(100% - 23px); }

.tap-toggle-text-off { margin-left: 26px; color: var(--text-muted); }
.tap-toggle-text-on  { margin-left: 4px;  color: #fff; }
.tap-toggle--on .tap-toggle-text-off { display: none; }
.tap-toggle:not(.tap-toggle--on) .tap-toggle-text-on { display: none; }

/* Pill buttons */
.tap-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: all var(--t) var(--ease);
  white-space: nowrap;
}

.tap-tool-pill:hover {
  background: var(--accent-pale);
  border-color: var(--accent);
  color: var(--accent);
}

.tap-pill-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.tap-pill-danger:hover { background: var(--red-pale); border-color: var(--red); color: var(--red); }

/* Icon button (dark toggle) */
.tap-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--t) var(--ease);
}
.tap-tool-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-pale); }
.tap-tool-btn svg { width: 16px; height: 16px; }

/* Dropdowns */
.tap-dropdown-wrap { position: relative; }

.tap-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 150px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-m);
  z-index: 200;
  overflow: hidden;
}

.tap-dropdown.tap-open { display: block; animation: tap-drop-in .12s var(--ease); }

@keyframes tap-drop-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tap-dropdown-item {
  display: block;
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--t);
}

.tap-dropdown-item:hover { background: var(--accent-pale); color: var(--accent); }

/* ── Grammar Banner ────────────────────────────────────────── */
.tap-grammar-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.tap-grammar-banner[hidden] { display: none; }

.tap-grammar-banner-inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
}

.tap-grammar-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  padding-top: 1px;
}

.tap-grammar-issues {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tap-issue {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  font-size: 13px;
  line-height: 1.4;
  animation: tap-fade-up .2s var(--ease) both;
}

@keyframes tap-fade-up {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tap-issue-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
}

.tap-badge-spelling      { background: var(--red-pale);    color: var(--red); }
.tap-badge-grammar       { background: var(--blue-pale);   color: var(--blue); }
.tap-badge-punctuation   { background: var(--yellow-pale); color: var(--yellow); }
.tap-badge-capitalization{ background: var(--yellow-pale); color: var(--yellow); }
.tap-badge-style         { background: var(--purple-pale); color: var(--purple); }

.tap-issue-body { flex: 1; }
.tap-issue-word { font-family: var(--mono); font-weight: 600; font-size: 12px; }
.tap-issue-msg  { color: var(--text-muted); margin-top: 2px; }

.tap-issue-fixes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.tap-fix-btn {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  cursor: pointer;
  color: var(--text);
  transition: all var(--t);
}

.tap-fix-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tap-issue-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  transition: color var(--t);
}

.tap-issue-dismiss:hover { color: var(--red); }

/* ── Panels ────────────────────────────────────────────────── */
.tap-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
}

.tap-panel {
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.tap-panel:last-child { border-right: none; }

.tap-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.tap-panel-empty {
  padding: 24px 16px;
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
}

/* ── Detail list ───────────────────────────────────────────── */
.tap-detail-list {
  list-style: none;
}

.tap-detail-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  transition: background var(--t);
}

.tap-detail-list li:last-child { border-bottom: none; }
.tap-detail-list li:hover { background: var(--surface2); }

.tap-dl-featured {
  background: var(--accent-pale) !important;
}

.tap-dl-featured .tap-dl-label { font-weight: 600; color: var(--accent); }

.tap-dl-label { color: var(--text-muted); }

.tap-dl-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 50px;
  text-align: right;
  transition: color .25s var(--ease);
}

@keyframes tap-val-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); color: var(--accent); }
  100% { transform: scale(1); }
}

.tap-dl-val.tap-pop { animation: tap-val-pop .25s var(--ease); }

/* ── Keyword density ───────────────────────────────────────── */
.tap-kd-tabs {
  display: flex;
  gap: 2px;
}

.tap-kd-tab {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t);
}

.tap-kd-tab--active,
.tap-kd-tab:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tap-keyword-body { padding: 0; }

.tap-kw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  transition: background var(--t);
}

.tap-kw-row:last-child { border-bottom: none; }
.tap-kw-row:hover { background: var(--surface2); }

.tap-kw-rank  { font-size: 10px; color: var(--text-faint); font-family: var(--mono); width: 16px; }
.tap-kw-word  { flex: 1; color: var(--text); font-family: var(--mono); font-size: 12px; }
.tap-kw-bar-wrap { width: 60px; height: 4px; background: var(--border); border-radius: 100px; overflow: hidden; }
.tap-kw-bar   { height: 100%; background: var(--accent); border-radius: 100px; transition: width .4s var(--ease); }
.tap-kw-count { font-family: var(--mono); font-size: 11px; color: var(--text-muted); width: 24px; text-align: right; }
.tap-kw-pct   { font-family: var(--mono); font-size: 11px; color: var(--text-faint); width: 38px; text-align: right; }

/* ── Flow / sentence-length ────────────────────────────────── */
.tap-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.tap-flow-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
}

.tap-flow-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.tap-sent-chip {
  font-size: 12px;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: var(--radius-s);
  border-left: 3px solid transparent;
  color: var(--text-muted);
  background: var(--surface2);
  transition: background var(--t);
  cursor: default;
}

.tap-sent-chip:hover { background: var(--border); }

.tap-sent-short  { border-left-color: #6ee7b7; }
.tap-sent-medium { border-left-color: #60a5fa; }
.tap-sent-long   { border-left-color: #fbbf24; }
.tap-sent-vlong  { border-left-color: #f87171; }

/* ── Toast notification ────────────────────────────────────── */
.tap-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  max-width: 280px;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  box-shadow: var(--shadow-l);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  pointer-events: none;
  z-index: 9999;
}

.tap-toast--show  { opacity: 1; transform: translateY(0); }
.tap-toast--ok    { background: var(--accent); }
.tap-toast--err   { background: var(--red); }

/* ── Scrollbars ────────────────────────────────────────────── */
.tap-editor::-webkit-scrollbar,
.tap-flow-body::-webkit-scrollbar { width: 4px; }
.tap-editor::-webkit-scrollbar-track,
.tap-flow-body::-webkit-scrollbar-track { background: transparent; }
.tap-editor::-webkit-scrollbar-thumb,
.tap-flow-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Stagger entrance for detail rows ──────────────────────── */
@keyframes tap-slide-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tap-detail-list li {
  animation: tap-slide-in .25s var(--ease) both;
}

.tap-detail-list li:nth-child(1)  { animation-delay: .03s; }
.tap-detail-list li:nth-child(2)  { animation-delay: .05s; }
.tap-detail-list li:nth-child(3)  { animation-delay: .07s; }
.tap-detail-list li:nth-child(4)  { animation-delay: .09s; }
.tap-detail-list li:nth-child(5)  { animation-delay: .11s; }
.tap-detail-list li:nth-child(6)  { animation-delay: .13s; }
.tap-detail-list li:nth-child(7)  { animation-delay: .15s; }
.tap-detail-list li:nth-child(8)  { animation-delay: .17s; }
.tap-detail-list li:nth-child(9)  { animation-delay: .19s; }
.tap-detail-list li:nth-child(10) { animation-delay: .21s; }
.tap-detail-list li:nth-child(11) { animation-delay: .23s; }
.tap-detail-list li:nth-child(12) { animation-delay: .25s; }
.tap-detail-list li:nth-child(13) { animation-delay: .27s; }
.tap-detail-list li:nth-child(14) { animation-delay: .29s; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 700px) {
  .tap-topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tap-count-display { font-size: 18px; }
  .tap-toolbar { flex-direction: column; align-items: flex-start; }
  .tap-panels { grid-template-columns: 1fr; }
  .tap-panel  { border-right: none; border-bottom: 1px solid var(--border); }
  .tap-toggle-label { display: none; }
}

@media (max-width: 480px) {
  .tap-editor { font-size: 14px; min-height: 200px; }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .tap-app *, .tap-app *::before, .tap-app *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   v1.1.0 Additions: Undo / Redo / Auto-Save
   ============================================================ */

/* ── History buttons (Undo / Redo) ─────────────────────────── */
.tap-history-group {
  display: flex;
  gap: 2px;
  align-items: center;
}

.tap-history-btn {
  opacity: .5;
  transition: opacity var(--t) var(--ease), all var(--t) var(--ease);
}

.tap-history-btn:not([disabled]) {
  opacity: 1;
}

.tap-history-btn[disabled] {
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Auto-Save button ──────────────────────────────────────── */
.tap-autosave-group {
  display: flex;
  align-items: center;
}

.tap-autosave-pill {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--text-muted);
  gap: 5px;
}

.tap-autosave-pill--on {
  background: var(--accent-pale);
  border-color: var(--accent);
  color: var(--accent);
}

.tap-autosave-pill--on:hover {
  background: var(--border);
  border-color: var(--border);
  color: var(--text-muted);
}

.tap-autosave-state {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  background: currentColor;
  color: var(--surface) !important;
  opacity: .85;
  letter-spacing: .04em;
  line-height: 1.4;
}

/* Pulse animation on the save icon when saving */
@keyframes tap-save-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.3); opacity: .6; }
}

.tap-autosave-pill--saving #tap-autosave-icon {
  animation: tap-save-pulse .7s ease infinite;
  color: var(--accent);
}

/* ── Auto-Save status bar ──────────────────────────────────── */
.tap-autosave-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 16px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--mono);
  min-height: 32px;
}

.tap-autosave-bar-left,
.tap-autosave-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Animated status dot */
.tap-autosave-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
  transition: background .4s var(--ease);
}

.tap-autosave-dot--saving  { background: var(--accent); animation: tap-dot-blink .5s ease infinite alternate; }
.tap-autosave-dot--saved   { background: var(--accent); }
.tap-autosave-dot--error   { background: var(--red); }
.tap-autosave-dot--off     { background: var(--border); }

@keyframes tap-dot-blink {
  from { opacity: .4; }
  to   { opacity: 1; }
}

/* History info (N steps back) */
.tap-history-info {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--mono);
}

/* Restore saved button */
.tap-autosave-restore-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-pale);
  border: 1px solid var(--accent);
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}

.tap-autosave-restore-btn[hidden] { display: none !important; }

.tap-autosave-restore-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Keyboard shortcut hint in toolbar ─────────────────────── */
.tap-history-btn[title]::after {
  /* Shown only on desktop via ::after pseudo, suppressed on mobile */
  content: '';
}

/* ── Undo/Redo available state highlight ───────────────────── */
.tap-history-btn:not([disabled]):hover {
  background: var(--accent-pale);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Responsive updates ────────────────────────────────────── */
@media (max-width: 700px) {
  .tap-autosave-bar { font-size: 10px; padding: 5px 10px; }
  .tap-history-group { gap: 1px; }
  .tap-autosave-state { display: none; }
}
