* {
  box-sizing: border-box;
}

:root {
  --primary: #6B8EAE;
  --accent: #9FB5C6;
  --background: #DCE4EB;
  --text: #2C3E50;
  --shadow: 0 16px 36px rgba(44, 62, 80, 0.10);
  --ink: rgba(55, 72, 88, 0.72);
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  color: var(--text);
  font-family: Tahoma, "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,0.9), transparent 18%),
    radial-gradient(circle at 75% 10%, rgba(159,181,198,0.22), transparent 20%),
    linear-gradient(180deg, #eef4f8 0%, #dce4eb 100%);
  overflow-x: hidden;
}

button,
input {
  font-family: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(255,255,255,0.75) 0 2px, transparent 2px),
    radial-gradient(circle at 64px 42px, rgba(107,142,174,0.13) 0 1.5px, transparent 1.5px);
  background-size: 92px 92px;
}

.app-shell {
  display: none;
  min-height: 100vh;
}

body.entered .app-shell {
  display: block;
  animation: pageFade 0.55s ease both;
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Entry
========================= */

.entry-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(255,255,255,0.9), transparent 28%),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.35), transparent 22%),
    linear-gradient(180deg, #eef4f8 0%, #dce4eb 100%);
}

.entry-screen.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.entry-paper {
  position: absolute;
  width: 260px;
  height: 680px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.62));
  filter: drop-shadow(0 12px 30px rgba(44,62,80,0.08));
  opacity: 0.72;
  pointer-events: none;
}

.entry-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20px 20px, rgba(107,142,174,0.1) 0 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.45;
}

.entry-paper-left {
  left: -110px;
  top: 38px;
  transform: rotate(-9deg);
  border-radius: 0 28px 28px 0;
}

.entry-paper-right {
  right: -118px;
  top: 36px;
  transform: rotate(9deg);
  border-radius: 28px 0 0 28px;
}

.entry-pencil {
  position: absolute;
  width: 42px;
  height: 260px;
  border-radius: 20px;
  background: linear-gradient(90deg, #4d5660 0 22%, #303841 22% 40%, #f2f5f7 40% 54%, #6b8eae 54% 100%);
  opacity: 0.28;
  filter: drop-shadow(0 12px 18px rgba(44,62,80,0.18));
  pointer-events: none;
}

.pencil-left {
  left: 72px;
  top: -76px;
  transform: rotate(-35deg);
}

.pencil-right {
  right: 64px;
  bottom: -82px;
  transform: rotate(52deg);
}

.entry-card {
  width: min(390px, calc(100% - 32px));
  padding: 22px 20px 18px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 15% 12%, rgba(255,255,255,0.95), transparent 28%),
    rgba(255,255,255,0.86);
  border: 2px solid rgba(78, 112, 142, 0.42);
  box-shadow: 0 22px 60px rgba(44,62,80,0.14), inset 0 0 0 2px rgba(255,255,255,0.5);
  text-align: center;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.18s ease;
}

.entry-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 24px;
  border: 2px dashed rgba(107,142,174,0.22);
  pointer-events: none;
}

.entry-sticker {
  position: absolute;
  right: -18px;
  top: 24px;
  width: 92px;
  min-height: 54px;
  padding: 9px 8px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(78,112,142,0.42);
  color: rgba(44,62,80,0.78);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  transform: rotate(7deg);
  box-shadow: 0 10px 20px rgba(44,62,80,0.08);
  display: grid;
  place-items: center;
  text-align: center;
}

.entry-window {
  height: 236px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.entry-door {
  width: 192px;
  height: 198px;
  border-radius: 38px 38px 24px 24px;
  background: linear-gradient(180deg, #fdfefe 0%, #dfeaf3 100%);
  border: 3px solid rgba(69, 84, 96, 0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 14px 28px rgba(44,62,80,0.12);
  transform: rotate(-2deg);
  position: relative;
  display: grid;
  place-items: center;
}

.entry-door::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 30px 30px 18px 18px;
  border: 2px dashed rgba(69,84,96,0.32);
}

.door-arch {
  position: absolute;
  width: 118px;
  height: 118px;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(159,181,198,0.38), transparent 58%), rgba(255,255,255,0.34);
  border: 2px solid rgba(69,84,96,0.28);
}

.entry-rabbit {
  width: 116px;
  height: 116px;
  object-fit: contain;
  z-index: 2;
  animation: rabbitPeek 3.6s ease-in-out infinite;
}

@keyframes rabbitPeek {
  0%, 100% {
    transform: translateY(-4px) rotate(0deg);
  }

  50% {
    transform: translateY(-12px) rotate(-2deg);
  }
}

.door-sign {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) rotate(-3deg);
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(107,142,174,0.9);
  color: white;
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 800;
  border: 2px solid rgba(69,84,96,0.26);
  box-shadow: 0 6px 12px rgba(44,62,80,0.1);
}

.entry-title {
  font-size: 25px;
  letter-spacing: 0.8px;
  font-weight: 900;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.95), -1px 0 0 rgba(107,142,174,0.18);
}

.entry-text p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(44,62,80,0.68);
}

.entry-button {
  margin-top: 14px;
  min-width: 120px;
  height: 42px;
  border: 3px solid rgba(69,84,96,0.32);
  border-radius: 14px;
  background: linear-gradient(180deg, #9fb5c6, #6b8eae);
  color: white;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 9px 0 rgba(80,110,136,0.24), 0 18px 28px rgba(44,62,80,0.1);
}

.entry-button:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 rgba(80,110,136,0.24), 0 10px 18px rgba(44,62,80,0.08);
}

.entry-mini-doodle {
  position: absolute;
  width: 34px;
  height: 34px;
  border: none;
  background: rgba(255,255,255,0.5);
  color: var(--primary);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  animation: doodleFloat 3.4s ease-in-out infinite;
  transition: transform 0.2s ease, background 0.2s ease;
}

.entry-mini-doodle:hover {
  transform: scale(1.18) rotate(10deg);
  background: rgba(255,255,255,0.9);
}

.doodle-star-one {
  top: 20px;
  left: 36px;
}

.doodle-star-two {
  bottom: 36px;
  right: 40px;
  animation-delay: 0.4s;
}

.doodle-cloud-one {
  top: 42px;
  right: 36px;
  animation-delay: 0.8s;
}

.doodle-heart-one {
  bottom: 30px;
  left: 42px;
  animation-delay: 1.1s;
}

@keyframes doodleFloat {
  0%, 100% {
    transform: translateY(0) rotate(-4deg);
  }

  50% {
    transform: translateY(-8px) rotate(5deg);
  }
}

.click-spark {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  color: var(--primary);
  font-size: 18px;
  animation: clickSpark 0.75s ease-out forwards;
}

@keyframes clickSpark {
  from {
    opacity: 1;
    transform: translate(0, 0) scale(0.8) rotate(0);
  }

  to {
    opacity: 0;
    transform: translate(var(--spark-x, 0px), var(--spark-y, -32px)) scale(1.4) rotate(80deg);
  }
}

/* =========================
   Layout
========================= */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  flex-shrink: 0;
  padding: 24px 18px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(246,250,253,0.92));
  border-right: 3px solid rgba(107,142,174,0.22);
  box-shadow: 10px 0 24px rgba(44,62,80,0.08);
  position: relative;
}

.sidebar::after {
  content: "";
  position: absolute;
  right: -11px;
  top: 0;
  width: 20px;
  height: 100%;
  background: radial-gradient(circle at 10px 10px, rgba(107,142,174,0.18) 0 6px, transparent 6px);
  background-size: 20px 20px;
  pointer-events: none;
}

.sidebar-logo {
  width: 154px;
  min-height: 112px;
  margin: 0 auto 20px;
  border-radius: 48% 52% 44% 56% / 56% 46% 54% 44%;
  background: #6b8eae;
  border: 3px solid rgba(69,84,96,0.36);
  color: white;
  display: grid;
  place-items: center;
  position: relative;
  transform: rotate(-2deg);
  box-shadow: 0 12px 22px rgba(44,62,80,0.1), inset 0 0 0 3px rgba(255,255,255,0.18);
}

.sidebar-logo::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(107,142,174,0.45);
  border-radius: 52% 48% 54% 46% / 44% 56% 46% 54%;
}

.sidebar-logo-rabbit {
  position: absolute;
  top: -28px;
  font-size: 28px;
}

.sidebar-logo-text {
  font-size: 28px;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(220,228,235,0.48);
  border: 2px dashed rgba(107,142,174,0.22);
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: 2px solid rgba(107,142,174,0.32);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 800;
}

.nickname {
  font-size: 14px;
  font-weight: 800;
}

.sub-name {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(44,62,80,0.56);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  height: 36px;
  border-radius: 14px;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
  position: relative;
}

.nav-item::after {
  content: "·";
  position: absolute;
  right: 10px;
  color: rgba(107,142,174,0.36);
}

.nav-item:hover {
  background: rgba(220,228,235,0.55);
}

.nav-item.active {
  background: rgba(107,142,174,0.14);
  border: 2px solid rgba(107,142,174,0.22);
}

.sidebar-links {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed rgba(107,142,174,0.25);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 12px;
  justify-content: center;
}

.side-section-title {
  width: 100%;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(44,62,80,0.56);
  margin-bottom: 8px;
}

.sidebar-links span {
  font-size: 12px;
  color: #2d7895;
  font-weight: 700;
}

.sidebar-note {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(220,228,235,0.5);
  border: 2px dashed rgba(107,142,174,0.2);
}

.sidebar-note-title {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: rgba(44,62,80,0.56);
}

.sidebar-note p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(44,62,80,0.62);
}

/* =========================
   Main
========================= */

.main {
  position: relative;
  flex: 1;
  min-height: 100vh;
  padding: 18px 26px 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 12%, rgba(255,255,255,0.72), transparent 18%),
    radial-gradient(circle at 30% 72%, rgba(159,181,198,0.18), transparent 24%),
    linear-gradient(180deg, #eaf3f8 0%, #d8e5ed 100%);
}

.paper-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(255,255,255,0.82) 0 2px, transparent 2px),
    radial-gradient(circle at 70px 42px, rgba(255,255,255,0.5) 0 1.5px, transparent 1.5px),
    linear-gradient(45deg, rgba(255,255,255,0.18) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.18) 75%);
  background-size: 150px 150px, 190px 190px, 42px 42px;
}

.doodle-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.main-doodle {
  position: absolute;
  color: rgba(107,142,174,0.38);
  font-size: 22px;
  font-weight: 900;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.9));
  animation: pageDoodleFloat 4.5s ease-in-out infinite;
}

.doodle-pin {
  left: 34px;
  top: 86px;
  transform: rotate(-18deg);
}

.doodle-cloud {
  right: 120px;
  top: 92px;
  font-size: 26px;
  animation-delay: 0.8s;
}

.doodle-star {
  left: 44%;
  top: 132px;
  animation-delay: 1.1s;
}

.doodle-carrot {
  right: 56px;
  bottom: 150px;
  font-size: 24px;
  animation-delay: 1.5s;
}

.doodle-rabbit-img {
  left: 36px;
  bottom: 86px;
  width: 24px;
  height: 24px;
  object-fit: contain;
  animation-delay: 2s;
}

@keyframes pageDoodleFloat {
  0%, 100% {
    transform: translateY(0) rotate(-6deg);
  }

  50% {
    transform: translateY(-9px) rotate(6deg);
  }
}

.retro-titlebar {
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 20px rgba(44,62,80,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  position: relative;
  z-index: 2;
}

.retro-title-left {
  color: #2d7895;
  letter-spacing: 2px;
  font-weight: 900;
  font-size: 15px;
}

.title-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #9fb5c6;
  border-radius: 50%;
  margin-right: 8px;
}

.retro-controls {
  display: flex;
  gap: 6px;
}

.retro-controls span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #edf4f8;
  color: rgba(44,62,80,0.6);
  font-size: 12px;
}

.top-header,
.page-section {
  position: relative;
  z-index: 2;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin: 22px 0 12px;
}

.top-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
}

.header-desc {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(44,62,80,0.64);
}

.top-right-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-card {
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.82);
  border: 2px solid rgba(107,142,174,0.2);
  box-shadow: var(--shadow);
  text-align: right;
  font-size: 13px;
}

#examCountdown {
  margin-top: 6px;
  color: #2d7895;
  font-weight: 800;
}

.settings-button,
.btn {
  height: 42px;
  border: 2px solid rgba(107,142,174,0.28);
  border-radius: 15px;
  padding: 0 20px;
  background: linear-gradient(180deg, #fff, #e3edf4);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(44,62,80,0.07);
}

.btn.primary {
  background: linear-gradient(180deg, #9fb5c6, #6b8eae);
  color: white;
}

.btn:hover,
.settings-button:hover {
  transform: translateY(-1px);
}

.page-section {
  display: none;
  padding-top: 24px;
}

.page-section.show {
  display: block;
}

.page-title-row {
  width: min(1040px, 100%);
  margin: 0 auto 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.page-title-row h2 {
  margin: 0;
  color: #2d7895;
  font-size: 26px;
  font-weight: 900;
  text-shadow: 1px 1px 0 white;
}

.page-title-row p {
  margin: 7px 0 0;
  color: rgba(44,62,80,0.62);
  font-size: 13px;
}

.panel-card,
.scrapbook-card {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,0.95), transparent 18%),
    rgba(255,255,255,0.76);
  border: 2px solid rgba(107,142,174,0.24);
  box-shadow: var(--shadow);
  position: relative;
}

.scrapbook-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(107,142,174,0.18);
  border-radius: 22px;
  pointer-events: none;
}

/* =========================
   Focus
========================= */

.hero {
  min-height: calc(100vh - 170px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.hero-card {
  width: min(560px, 100%);
  text-align: center;
}

.status-pill {
  position: absolute;
  right: 24px;
  top: 22px;
  padding: 7px 12px;
  border-radius: 999px;
  background: white;
  color: #2d7895;
  font-size: 12px;
  font-weight: 900;
}

.character-wrapper {
  width: 285px;
  height: 285px;
  margin: 0 auto;
  border-radius: 30px;
  background: linear-gradient(180deg, white, #e7eff5);
  border: 2px solid rgba(107,142,174,0.22);
  display: grid;
  place-items: center;
}

.character-img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  animation: floatRole 3.5s ease-in-out infinite;
}

@keyframes floatRole {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

.emotion-text {
  margin: 16px 0 6px;
  font-size: 14px;
}

.timer-display {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 78px;
  font-weight: 900;
  color: var(--primary);
}

.progress-bar {
  width: 72%;
  height: 10px;
  margin: 22px auto 24px;
  border-radius: 999px;
  background: white;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #9fb5c6, #6b8eae);
}

.controls,
.quick-time-area,
.vocab-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-time-area {
  margin-top: 16px;
}

.quick-time-btn {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(107,142,174,0.25);
  background: white;
  color: var(--primary);
  cursor: pointer;
}

.quick-time-btn.active,
.quick-time-btn:hover {
  background: var(--primary);
  color: white;
}

.task-list {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.task-card {
  min-height: 82px;
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
}

.task-card.done {
  opacity: 0.65;
}

.task-card.done .task-title {
  text-decoration: line-through;
}

.checkbox {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--accent);
  background: white;
}

.task-card.done .checkbox {
  background: var(--primary);
}

/* =========================
   Forms / Plans
========================= */

.add-task-row {
  display: flex;
  gap: 12px;
}

.add-task-row .form-input {
  flex: 1;
}

.form-area {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.form-input {
  height: 42px;
  border-radius: 14px;
  border: 2px solid rgba(107,142,174,0.22);
  background: white;
  padding: 0 14px;
  outline: none;
}

.plan-list,
.wrong-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-item,
.wrong-item {
  padding: 13px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, white, #edf4f8);
  border: 1px solid rgba(107,142,174,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-check {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid var(--accent);
  background: white;
  cursor: pointer;
}

.plan-item.done {
  opacity: 0.65;
}

.plan-item.done span {
  text-decoration: line-through;
}

.plan-item span {
  flex: 1;
}

.plan-delete,
.wrong-item button {
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(107,142,174,0.16);
  color: #2d7895;
  cursor: pointer;
}

/* =========================
   Vocab
========================= */

.vocab-layout {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
}

.vocab-book-btn {
  width: 100%;
  height: 50px;
  margin-bottom: 12px;
  border-radius: 16px;
  border: 2px solid rgba(107,142,174,0.2);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  cursor: pointer;
}

.vocab-book-btn.active,
.vocab-book-btn:hover {
  background: var(--primary);
  color: white;
}

.import-box {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed rgba(107,142,174,0.25);
}

.file-label {
  height: 40px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: white;
  border: 1px solid rgba(107,142,174,0.22);
  color: #2d7895;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.file-label input {
  display: none;
}

.vocab-card {
  min-height: 470px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vocab-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.vocab-book-name {
  color: #2d7895;
  font-weight: 900;
}

.vocab-progress {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(44,62,80,0.55);
}

.flashcard {
  width: min(520px, 100%);
  margin-top: 34px;
  perspective: 1200px;
}

.flashcard-inner {
  position: relative;
  min-height: 300px;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, white, #e8f0f6);
  border: 2px solid rgba(107,142,174,0.22);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 26px;
}

.flashcard-back {
  transform: rotateY(180deg);
}

.flashcard-tag {
  position: absolute;
  top: 16px;
  left: 18px;
  font-size: 11px;
  color: #2d7895;
  letter-spacing: 1.5px;
  font-weight: 900;
}

.vocab-word {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  color: var(--primary);
  font-weight: 900;
  word-break: break-word;
}

.vocab-phonetic {
  margin-top: 10px;
  color: rgba(44,62,80,0.62);
}

.vocab-meaning {
  font-size: 20px;
  line-height: 1.8;
}

.flashcard-hint,
.ocr-status,
.vocab-tip {
  font-size: 12px;
  color: rgba(44,62,80,0.56);
}

.ocr-status {
  margin-top: 14px;
  color: #2d7895;
}

/* =========================
   Achievement / Modal / Companion
========================= */

.achievement-grid {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.achievement-card {
  min-height: 170px;
  text-align: center;
  display: grid;
  grid-template-rows: 54px 48px 24px;
  align-content: center;
  justify-items: center;
  row-gap: 8px;
}

.achievement-card span {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  line-height: 1;
}

.achievement-card strong {
  display: block;
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 48px;
  color: var(--primary);
}

.achievement-card p {
  margin: 0;
  line-height: 24px;
}

.modal-mask {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(44,62,80,0.18);
  backdrop-filter: blur(8px);
}

.modal-mask.show {
  display: flex;
}

.settings-modal {
  width: min(430px, calc(100% - 40px));
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.close-button {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  font-size: 20px;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.companion-card {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 18;
  max-width: 310px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
}

.companion-card img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  animation: floatRole 3.5s ease-in-out infinite;
}

.companion-name {
  font-size: 12px;
  font-weight: 900;
  color: #2d7895;
}

#companionText {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.floating-timer-widget {
  position: fixed;
  right: 24px;
  bottom: 112px;
  z-index: 18;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.rabbit-peek {
  font-size: 40px;
  animation: floatRole 3.5s ease-in-out infinite;
}

.timer-shell {
  min-width: 150px;
  padding: 11px 13px;
  border-radius: 20px;
  background: white;
  border: 2px solid rgba(107,142,174,0.22);
  box-shadow: var(--shadow);
  text-align: center;
}

.timer-label {
  color: #2d7895;
  font-weight: 900;
  font-size: 12px;
}

.timer-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 900;
}

.confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.confetti {
  position: absolute;
  width: 8px;
  height: 12px;
  top: 46%;
  left: 50%;
  border-radius: 2px;
  opacity: 0;
  --x: 0px;
  --y: -200px;
  --r: 360deg;
  animation: confettiFly 1.9s ease-out forwards;
}

@keyframes confettiFly {
  0% {
    transform: translateX(0) translateY(0) rotate(0deg) scale(0.8);
    opacity: 1;
  }

  75% {
    opacity: 1;
  }

  100% {
    transform: translateX(var(--x)) translateY(var(--y)) rotate(var(--r)) scale(1);
    opacity: 0;
  }
}

/* =========================
   Responsive
========================= */

@media (max-width: 1100px) {
  .vocab-layout {
    grid-template-columns: 1fr;
  }

  .achievement-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding-bottom: 18px;
  }

  .nav-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-note {
    position: static;
    margin-top: 20px;
  }

  .main {
    min-height: auto;
    overflow: visible;
    padding: 16px;
  }

  .top-header {
    flex-direction: column;
    align-items: stretch;
  }

  .top-right-area {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .date-card,
  .settings-button {
    width: 100%;
    text-align: left;
  }

  .page-title-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .panel-card,
  .scrapbook-card,
  .page-title-row,
  .vocab-layout,
  .achievement-grid {
    width: 100%;
  }

  .add-task-row {
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding: 6px 0 24px;
  }

  .hero-card {
    width: 100%;
  }

  .character-wrapper {
    width: 220px;
    height: 220px;
  }

  .task-list {
    grid-template-columns: 1fr;
  }

  .vocab-layout {
    grid-template-columns: 1fr;
  }

  .vocab-card {
    min-height: auto;
  }

  .flashcard {
    margin-top: 22px;
  }

  .achievement-grid {
    grid-template-columns: 1fr;
  }

  .companion-card,
  .floating-timer-widget {
    display: none;
  }
}

@media (max-width: 640px) {
  .sidebar {
    padding: 16px 12px 14px;
  }

  .sidebar-logo {
    width: 116px;
    height: 82px;
    margin-bottom: 10px;
  }

  .sidebar-logo-img {
    width: 34px;
    height: 34px;
  }

  .sidebar-logo-text {
    font-size: 16px;
  }

  .user-area {
    padding: 10px;
    gap: 10px;
  }

  .avatar {
    width: 42px;
    height: 42px;
  }

  .nav-menu {
    grid-template-columns: 1fr;
  }

  .nav-item {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .main {
    padding: 12px;
  }

  .top-header {
    margin-top: 14px;
    gap: 14px;
  }

  .top-header h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .header-desc,
  .page-title-row p {
    font-size: 12px;
  }

  .date-card,
  .settings-button,
  .btn {
    height: 40px;
    border-radius: 13px;
    padding: 0 14px;
    font-size: 13px;
  }

  .page-section {
    padding-top: 18px;
  }

  .page-title-row h2 {
    font-size: 22px;
  }

  .panel-card,
  .scrapbook-card {
    padding: 16px;
    border-radius: 22px;
  }

  .scrapbook-card::before {
    inset: 7px;
    border-radius: 18px;
  }

  .hero-card {
    padding: 18px 14px;
  }

  .status-pill {
    top: 16px;
    right: 16px;
  }

  .character-wrapper {
    width: 170px;
    height: 170px;
  }

  .emotion-text {
    font-size: 16px;
  }

  .timer-display {
    font-size: 32px;
  }

  .controls {
    flex-direction: column;
  }

  .controls .btn {
    width: 100%;
  }

  .quick-time-area {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-card {
    padding: 14px;
  }

  .task-title,
  .plan-text,
  .wrong-word,
  .wrong-meaning {
    font-size: 13px;
  }

  .add-task-row .form-input,
  .form-input {
    width: 100%;
  }

  .vocab-book-btn,
  .file-label {
    height: 44px;
  }

  .vocab-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .flashcard-inner {
    min-height: 260px;
  }

  .flashcard-face {
    padding: 18px;
    border-radius: 22px;
  }

  .vocab-word {
    font-size: 34px;
  }

  .vocab-meaning {
    font-size: 17px;
    line-height: 1.6;
  }

  .achievement-grid {
    gap: 12px;
  }

  .achievement-card {
    min-height: 150px;
    grid-template-rows: 44px 42px 22px;
  }

  .achievement-card span {
    min-height: 44px;
    font-size: 26px;
  }

  .achievement-card strong {
    font-size: 32px;
    line-height: 42px;
  }

  .achievement-card p {
    font-size: 12px;
    line-height: 22px;
  }
}

/* =========================
   最后微调：图标大小和位置
========================= */

.sidebar-logo {
  width: 132px;
  height: 92px;
  margin: 0 auto 12px;
}

.sidebar-logo-img {
  width: 44px;
  height: 44px;
  margin-top: -2px;
}

.sidebar-logo-text {
  font-size: 20px;
  margin-top: 2px;
}

.nav-item {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.nav-icon {
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon img {
  width: 16px !important;
  height: 16px !important;
  object-fit: contain;
  display: block;
}

.sidebar-note {
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px;
}

.floating-timer-widget {
  right: 14px;
  bottom: 78px;
}

.floating-rabbit-img {
  width: 42px;
  height: 42px;
}

.timer-shell {
  min-width: 130px;
  padding: 9px 11px;
}

.timer-number {
  font-size: 20px;
}