* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #e8eaed;
  min-height: 100vh;
  color: #202124;
}

#tmt-app {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 12px 32px;
}

.tmt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.8rem;
}

.tmt-brand { opacity: 0.6; }
.tmt-exit { color: #5f6368; text-decoration: none; font-size: 0.8rem; }

.tmt-productivity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.tmt-bar {
  flex: 1;
  height: 12px;
  background: #dadce0;
  border-radius: 999px;
  overflow: hidden;
}

.tmt-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #fbbc04, #34a853);
  border-radius: 999px;
  transition: width 0.2s, background 0.2s;
}

.tmt-fill.low { background: linear-gradient(90deg, #ea4335, #fbbc04); }
.tmt-fill.high { background: linear-gradient(90deg, #34a853, #1e8e3e); }

.tmt-browser {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  border: 1px solid #dadce0;
}

.tmt-tabbar {
  display: flex;
  gap: 2px;
  padding: 8px 8px 0;
  background: #dee1e6;
  overflow-x: auto;
  min-height: 42px;
}

.tmt-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  padding: 8px 12px;
  background: #c4c7cc;
  border-radius: 8px 8px 0 0;
  font-size: 0.75rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tmt-tab.active { background: #fff; }
.tmt-tab.noisy { animation: tmt-pulse 0.6s infinite; }
.tmt-tab .tmt-speaker { color: #ea4335; font-weight: 700; }

@keyframes tmt-pulse {
  0%, 100% { box-shadow: inset 0 -2px 0 #ea4335; }
  50% { box-shadow: inset 0 -2px 0 #ea4335, 0 0 8px rgba(234, 67, 53, 0.5); }
}

.tmt-tab .tmt-x {
  margin-left: auto;
  opacity: 0.5;
  font-size: 0.9rem;
  padding: 0 2px;
}

.tmt-tab .tmt-x:hover { opacity: 1; color: #ea4335; }

.tmt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #e8eaed;
  background: #f8f9fa;
}

.tmt-toolbar button {
  font-family: inherit;
  font-size: 0.78rem;
  padding: 6px 12px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.tmt-mute { background: #fce8e6 !important; border-color: #ea4335 !important; color: #c5221f; font-weight: 600; }

.tmt-boss {
  margin-left: auto;
  color: #c5221f;
  font-weight: 700;
  font-size: 0.85rem;
  animation: tmt-boss 0.5s infinite;
}

@keyframes tmt-boss {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.tmt-content {
  min-height: 280px;
  padding: 24px;
  position: relative;
}

.tmt-page-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.tmt-page-body { font-size: 0.9rem; line-height: 1.6; color: #5f6368; }

.tmt-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #dadce0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  min-width: 240px;
  z-index: 5;
}

.tmt-popup button {
  margin-top: 12px;
  padding: 8px 20px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.tmt-msg {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 12px;
  color: #5f6368;
}

.tmt-screen {
  position: fixed;
  inset: 0;
  background: rgba(232, 234, 237, 0.96);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 20;
}

.tmt-screen.active { display: flex; }

.tmt-screen h1, .tmt-screen h2 { margin-bottom: 12px; }
.tmt-screen p { max-width: 420px; line-height: 1.6; margin-bottom: 12px; }
.tmt-twist { font-size: 0.9rem; color: #5f6368; }

.tmt-screen button {
  margin-top: 16px;
  padding: 12px 28px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}

.tmt-browser.boss-walk { animation: tmt-shake 0.15s infinite; }

@keyframes tmt-shake {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}

/* ── Shared UI polish ── */
body {
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(66,133,244,0.08) 0%, transparent 40%) !important;
}
button, .btn, [role="button"] {
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}
button:hover:not(:disabled), .btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
