@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Bubblegum+Sans&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

:root {
  --theme-bg: linear-gradient(180deg, #1a0533 0%, #2d1b69 30%, #5b2d8e 60%, #8b5fbf 80%, #c4a6e0 100%);
  --theme-font: 'Fredoka One', 'Bubblegum Sans', cursive;
  --theme-text-shadow:
    0 0 20px rgba(255, 150, 200, 0.8),
    0 0 40px rgba(150, 200, 255, 0.6),
    0 0 80px rgba(200, 150, 255, 0.4),
    4px 4px 0 rgba(100, 50, 150, 0.5);
  --theme-hint-bg: linear-gradient(135deg, rgba(255, 150, 200, 0.3), rgba(150, 200, 255, 0.3));
  --theme-hint-border: rgba(255, 255, 255, 0.3);
  --theme-overlay: rgba(0, 0, 0, 0.85);
  --theme-parent-btn: linear-gradient(135deg, #ff69b4, #9b59b6);
  --theme-parent-zone: rgba(255,255,255,0);
  --theme-ambient-top: transparent;
  --theme-ambient-mid-1: rgba(100, 200, 255, 0.05);
  --theme-ambient-mid-2: rgba(150, 100, 255, 0.08);
  --theme-ambient-mid-3: rgba(200, 150, 255, 0.05);
  --theme-ambient-bottom: transparent;
  --theme-glass: rgba(255,255,255,0.12);
  --theme-glass-border: rgba(255,255,255,0.18);
  --theme-vignette: radial-gradient(circle at center, transparent 45%, rgba(3, 8, 20, 0.26) 100%);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

body {
  background: var(--theme-bg);
  font-family: var(--theme-font);
  cursor: none;
  color: white;
  transition: background 0.8s ease, color 0.4s ease;
}

#backdrop-gradient,
#backdrop-vignette,
#backdrop-stars,
#backdrop-orbs,
#theme-scene,
.snowflakes,
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#backdrop-gradient {
  z-index: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 28%),
    radial-gradient(circle at 80% 25%, rgba(255,255,255,0.08), transparent 22%),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,0.08), transparent 25%);
  mix-blend-mode: screen;
}

#backdrop-vignette {
  z-index: 1;
  background: var(--theme-vignette);
}

#backdrop-stars {
  z-index: 1;
  overflow: hidden;
}

.backdrop-star {
  position: absolute;
  color: rgba(255,255,255,0.6);
  animation: twinkle 4s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.18));
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 0.75; transform: scale(1.1); }
}

#backdrop-orbs {
  z-index: 1;
  overflow: hidden;
}

.backdrop-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.22;
  animation: orb-drift linear infinite alternate;
}

@keyframes orb-drift {
  from { transform: translate3d(-2vw, -1vh, 0) scale(0.95); }
  to { transform: translate3d(2vw, 2vh, 0) scale(1.08); }
}

#theme-scene {
  z-index: 2;
  overflow: hidden;
}

.scene-layer {
  position: absolute;
  inset: auto 0 0 0;
  pointer-events: none;
  background-repeat: repeat-x;
  background-position: bottom center;
  transform-origin: center bottom;
  opacity: 0.72;
}

.scene-layer.layer-back {
  height: 45%;
  opacity: 0.3;
}

.scene-layer.layer-mid {
  height: 34%;
  opacity: 0.45;
}

.scene-layer.layer-front {
  height: 24%;
  opacity: 0.75;
}

.scene-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.06) 100%);
  mix-blend-mode: screen;
}

.snowflakes {
  z-index: 3;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2em;
  animation: fall linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(105vh) rotate(360deg);
  }
}

.aurora {
  z-index: 3;
  background: linear-gradient(
    180deg,
    var(--theme-ambient-top) 0%,
    var(--theme-ambient-mid-1) 20%,
    var(--theme-ambient-mid-2) 40%,
    var(--theme-ambient-mid-3) 60%,
    var(--theme-ambient-bottom) 100%
  );
  animation: aurora-shift 8s ease-in-out infinite alternate;
}

@keyframes aurora-shift {
  0% { opacity: 0.3; transform: translateX(-5%); }
  100% { opacity: 0.7; transform: translateX(5%); }
}

#display {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.letter-display {
  font-size: min(45vw, 45vh);
  color: white;
  text-shadow: var(--theme-text-shadow);
  animation: letter-appear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
  text-align: center;
  line-height: 1.1;
  position: relative;
  padding: 0.08em 0.18em;
}

.letter-display.word {
  font-size: min(18vw, 18vh);
}

.letter-display.word-long {
  font-size: min(12vw, 12vh);
}

.output-card {
  padding: 18px 24px;
  border-radius: 28px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 24px 70px rgba(0,0,0,0.24);
  backdrop-filter: blur(12px);
}

.output-caption {
  display: none;
}

.letter-display.emoji {
  font-size: min(35vw, 35vh);
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(255, 200, 255, 0.5));
}

.scattered-emoji {
  position: fixed;
  pointer-events: none;
  z-index: 18;
  animation: scatter-appear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
             scatter-fade 3s ease-in 1s forwards;
}

@keyframes scatter-appear {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  70% { transform: scale(1.2) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(var(--rot)); opacity: 1; }
}

@keyframes scatter-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.bubble {
  position: fixed;
  pointer-events: none;
  z-index: 28;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.7), rgba(200, 170, 255, 0.24) 50%, rgba(150, 200, 255, 0.12) 80%, transparent);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  animation: bubble-rise ease-out forwards;
}

@keyframes bubble-rise {
  0% {
    transform: scale(0.3) translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: scale(1) translateY(var(--rise-y));
    opacity: 0.7;
  }
  100% {
    transform: scale(0.6) translateY(calc(var(--rise-y) * 2));
    opacity: 0;
  }
}

@keyframes letter-appear {
  0% {
    transform: scale(0) rotate(-20deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.3) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.word-hint {
  position: absolute;
  bottom: 15%;
  font-size: min(8vw, 8vh);
  color: rgba(255, 255, 255, 0.88);
  background: var(--theme-hint-bg);
  padding: 10px 30px;
  border-radius: 50px;
  border: 2px solid var(--theme-hint-border);
  backdrop-filter: blur(12px);
  animation: hint-appear 0.5s ease-out;
  text-align: center;
  z-index: 10;
  box-shadow: 0 16px 40px rgba(0,0,0,0.16);
}

@keyframes hint-appear {
  0% { transform: translateY(20px) scale(0.8); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 30;
  animation: sparkle-fly linear forwards;
}

@keyframes sparkle-fly {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0) rotate(720deg);
    opacity: 0;
  }
}

.frozen-burst {
  position: fixed;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 25;
  animation: burst-out 0.8s ease-out forwards;
}

@keyframes burst-out {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--bx), var(--by)) scale(0);
    opacity: 0;
  }
}

.ripple {
  position: fixed;
  border-radius: 50%;
  border: 3px solid rgba(255, 200, 255, 0.6);
  pointer-events: none;
  z-index: 25;
  animation: ripple-expand 0.8s ease-out forwards;
}

@keyframes ripple-expand {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    width: 200px;
    height: 200px;
    opacity: 0;
  }
}

.float-emoji {
  position: fixed;
  font-size: 3em;
  pointer-events: none;
  z-index: 30;
  animation: float-up 2s ease-out forwards;
}

@keyframes float-up {
  0% {
    transform: translateY(0) scale(0.5) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-100px) scale(1.2) rotate(15deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-250px) scale(0.8) rotate(-10deg);
    opacity: 0;
  }
}

.idle-prompt {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  animation: idle-bounce 3s ease-in-out infinite;
}

.idle-prompt .emoji-row {
  font-size: min(18vw, 18vh);
  margin-bottom: 20px;
}

.idle-prompt .text {
  font-size: min(6vw, 6vh);
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 0 20px rgba(200, 150, 255, 0.5);
}

.idle-prompt .subtext {
  margin-top: 12px;
  font-size: min(2.8vw, 18px);
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes idle-bounce {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -53%) scale(1.05); }
}

#parent-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--theme-overlay);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}

#parent-overlay.visible {
  display: flex;
}

#parent-overlay h2 {
  color: white;
  font-size: 2.2em;
  margin-bottom: 10px;
}

#parent-overlay p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1em;
  margin-bottom: 6px;
  text-align: center;
}

#parent-panel {
  width: min(92vw, 760px);
  padding: 28px;
  border-radius: 28px;
  background: rgba(10, 14, 28, 0.42);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 30px 90px rgba(0,0,0,0.3);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.parent-subtitle {
  max-width: 560px;
}

#parent-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

#parent-notes {
  width: 100%;
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.parent-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.84);
  font-size: 0.95rem;
  line-height: 1.45;
}

.parent-note strong {
  display: block;
  margin-bottom: 4px;
  color: white;
}

.parent-btn {
  padding: 15px 40px;
  font-size: 1.08em;
  font-family: var(--theme-font);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  margin: 6px;
  transition: transform 0.2s, opacity 0.2s;
  min-width: 260px;
}

.parent-btn:hover {
  transform: scale(1.05);
}

.parent-btn.fullscreen {
  background: var(--theme-parent-btn);
  color: white;
}

.parent-btn.exit {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.24);
}

#parent-zone {
  position: fixed;
  top: 0;
  left: 0;
  width: 72px;
  height: 72px;
  z-index: 500;
  cursor: none;
  background: var(--theme-parent-zone);
}

.edge-blocker {
  position: fixed;
  z-index: 100;
  background: transparent;
}

.edge-blocker.top { top: 0; left: 0; right: 0; height: 15px; }
.edge-blocker.bottom { bottom: 0; left: 0; right: 0; height: 15px; }
.edge-blocker.left { top: 0; left: 0; bottom: 0; width: 15px; }
.edge-blocker.right { top: 0; right: 0; bottom: 0; width: 15px; }

#cursor-sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  font-size: 2em;
  transition: left 0.05s, top 0.05s;
}

#theme-banner {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 700;
  pointer-events: none;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(10, 15, 35, 0.35);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
  color: rgba(255,255,255,0.9);
  font-size: min(3vw, 18px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: center;
}

#theme-banner.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#theme-banner .sub {
  display: block;
  font-size: 0.72em;
  opacity: 0.8;
  letter-spacing: 0.12em;
  margin-top: 3px;
}

#theme-banner.pulse {
  box-shadow: 0 18px 50px rgba(0,0,0,0.24), 0 0 24px rgba(255,255,255,0.08);
}

#mode-hud {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 650;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#mode-chip,
#math-chip {
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(8, 12, 24, 0.34);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.82);
  font-size: min(2.4vw, 14px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#math-chip {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#math-chip.visible {
  opacity: 1;
  transform: translateY(0);
}

#demo-chip {
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.82);
  font-size: min(2.4vw, 14px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#demo-chip.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  #mode-hud {
    display: none;
  }

  #parent-panel,
  #parent-grid,
  #parent-notes {
    display: block;
  }

  .parent-btn {
    width: 100%;
    min-width: 220px;
    padding: 14px 24px;
  }

  .parent-note {
    margin-top: 10px;
  }
}

/* === Persona Toggle === */

#persona-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 950;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
  font-family: var(--theme-font);
}

.persona-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(20, 12, 40, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.persona-option {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s ease;
  pointer-events: none;
}

.persona-emoji {
  font-size: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.persona-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, #ff7eb6, #9b5cf6);
  border-radius: 999px;
  box-shadow:
    0 4px 12px rgba(155, 92, 246, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.32s cubic-bezier(0.4, 1.6, 0.5, 1), background 0.32s ease;
  z-index: 1;
}

body.persona-daddy .persona-track .persona-daddy { color: white; }
body.persona-mummy .persona-track .persona-mummy { color: white; }

body.persona-mummy .persona-thumb {
  transform: translateX(100%);
  background: linear-gradient(135deg, #2b579a, #4a8cc4);
  box-shadow:
    0 4px 12px rgba(43, 87, 154, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.persona-mummy .persona-track {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(43, 87, 154, 0.4);
}

body.persona-mummy .persona-track .persona-option {
  color: #5a6478;
}

body.persona-mummy .persona-track .persona-mummy {
  color: white;
}

#persona-toggle:hover .persona-track {
  transform: scale(1.04);
}

#persona-toggle:active .persona-track {
  transform: scale(0.97);
}

/* === Mummy Mode (Word Processor) === */

#mummy-mode {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: none;
  flex-direction: column;
  background: #e6e6e6;
  font-family: 'Segoe UI', 'Calibri', system-ui, -apple-system, sans-serif;
  color: #1f1f1f;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

body.persona-mummy #mummy-mode {
  display: flex;
}

body.persona-mummy {
  cursor: default;
  background: #e6e6e6;
}

body.persona-mummy #display,
body.persona-mummy #backdrop-gradient,
body.persona-mummy #backdrop-vignette,
body.persona-mummy #backdrop-stars,
body.persona-mummy #backdrop-orbs,
body.persona-mummy #theme-scene,
body.persona-mummy .snowflakes,
body.persona-mummy .aurora,
body.persona-mummy #theme-banner,
body.persona-mummy #mode-hud,
body.persona-mummy #cursor-sparkle {
  display: none !important;
}

.word-titlebar {
  background: linear-gradient(180deg, #2b579a, #1f4173);
  color: white;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 13px;
  flex-shrink: 0;
  -webkit-app-region: drag;
}

.word-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.word-app-icon { font-size: 16px; }
.word-doc-name { font-weight: 600; }
.word-doc-suffix { opacity: 0.75; }
.word-app-name { opacity: 0.85; margin-left: 6px; }

.word-title-right {
  display: flex;
  gap: 0;
}

.word-window-btn {
  width: 46px;
  height: 36px;
  border: none;
  background: transparent;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.word-window-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.word-window-btn.close:hover {
  background: #e81123;
}

.word-tabs {
  background: #2b579a;
  display: flex;
  gap: 2px;
  padding: 0 12px;
  flex-shrink: 0;
}

.word-tab {
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  transition: background 0.15s, color 0.15s;
}

.word-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.word-tab.active {
  background: #f3f2f1;
  color: #2b579a;
}

.word-tab.heidi {
  margin-left: auto;
  background: linear-gradient(135deg, #ff7eb6, #9b5cf6);
  color: white;
}

.word-ribbon {
  background: #f3f2f1;
  border-bottom: 1px solid #d1d1d1;
  padding: 6px 8px;
  display: flex;
  gap: 0;
  align-items: stretch;
  flex-shrink: 0;
  overflow-x: auto;
}

.ribbon-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  border-right: 1px solid #d8d8d8;
  min-width: 60px;
}

.ribbon-row {
  display: flex;
  gap: 3px;
  align-items: center;
  margin-bottom: 2px;
}

.ribbon-label {
  font-size: 11px;
  color: #555;
  margin-top: 4px;
  text-align: center;
  font-weight: 400;
}

.ribbon-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
  color: #1f1f1f;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.1s, border-color 0.1s;
}

.ribbon-btn:hover {
  background: #e1e1e1;
  border-color: #c0c0c0;
}

.ribbon-btn:active,
.ribbon-btn.active {
  background: #cce4f7;
  border-color: #2b579a;
}

.ribbon-btn.big {
  flex-direction: column;
  min-width: 56px;
  height: 60px;
  font-size: 22px;
  line-height: 1.1;
}

.ribbon-btn.big .ribbon-small {
  font-size: 11px;
  font-weight: 400;
  margin-top: 4px;
}

.ribbon-select {
  height: 26px;
  border: 1px solid #c0c0c0;
  border-radius: 3px;
  background: white;
  padding: 0 6px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ribbon-select.font-family { width: 140px; }
.ribbon-select.font-size { width: 56px; }

.color-btn {
  flex-direction: column;
  padding: 2px 4px;
  cursor: pointer;
  min-width: 32px;
}

.color-btn .color-letter {
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.color-btn input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  padding: 0;
}

.color-btn .color-swatch {
  width: 18px;
  height: 4px;
  margin-top: 2px;
  border-radius: 1px;
}

.word-rulers {
  background: #e6e6e6;
  padding: 4px 0;
  flex-shrink: 0;
}

.word-ruler {
  width: 8.5in;
  max-width: 90%;
  height: 16px;
  margin: 0 auto;
  background: linear-gradient(180deg, #fafafa, #ececec);
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.ruler-tick {
  position: absolute;
  top: 4px;
  width: 1px;
  height: 8px;
  background: #888;
}

.word-canvas {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 0 60px;
  background: #e6e6e6;
  display: flex;
  justify-content: center;
  -webkit-user-select: text;
  user-select: text;
}

.word-canvas::-webkit-scrollbar {
  width: 14px;
}

.word-canvas::-webkit-scrollbar-track {
  background: #e6e6e6;
}

.word-canvas::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 7px;
  border: 3px solid #e6e6e6;
}

.word-canvas::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

.word-page {
  width: 8.5in;
  max-width: 90%;
  min-height: 11in;
  background: white;
  padding: 1in 1.25in;
  font-family: 'Calibri', 'Segoe UI', system-ui, sans-serif;
  font-size: 14pt;
  line-height: 1.5;
  color: #1f1f1f;
  box-shadow:
    0 0 0 1px #d1d1d1,
    0 8px 24px rgba(0, 0, 0, 0.12);
  outline: none;
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
  caret-color: #2b579a;
}

.word-page h1 {
  font-size: 28pt;
  font-weight: 700;
  color: #2b579a;
  margin-bottom: 12px;
  font-family: 'Calibri Light', 'Segoe UI Light', system-ui, sans-serif;
}

.word-page h2 {
  font-size: 20pt;
  font-weight: 600;
  color: #2b579a;
  margin: 14px 0 8px;
}

.word-page p {
  margin-bottom: 8px;
}

.word-page ul,
.word-page ol {
  margin-left: 32px;
  margin-bottom: 8px;
}

.word-page .heidi-sticker {
  display: inline-block;
  font-size: 1.4em;
  margin: 0 2px;
  transform-origin: center;
  animation: stickerPop 0.5s cubic-bezier(0.4, 1.7, 0.5, 1);
}

@keyframes stickerPop {
  0% { transform: scale(0) rotate(-30deg); }
  60% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

.word-statusbar {
  background: #2b579a;
  color: white;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  font-size: 12px;
  flex-shrink: 0;
}

.status-item strong {
  font-weight: 600;
  margin-left: 2px;
}

.status-spacer { flex: 1; }

.status-item.zoom {
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 3px;
}

@media (max-width: 720px) {
  .word-titlebar { font-size: 12px; padding: 0 8px; }
  .word-window-btn { width: 38px; }
  .word-tabs { padding: 0 8px; overflow-x: auto; }
  .word-tab { padding: 6px 10px; font-size: 12px; }
  .ribbon-btn.big { min-width: 44px; height: 54px; font-size: 18px; }
  .ribbon-select.font-family { width: 100px; }
  .word-page { padding: 0.5in 0.6in; font-size: 13pt; }
  #persona-toggle { top: 10px; right: 10px; }
  .persona-text { display: none; }
  .persona-option { padding: 8px 10px; }
}
