:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --card: #ffffff;
  --text: #141a18;
  --muted: #68706a;
  --line: #dfe6df;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #10b981;
  --shadow: 0 24px 60px rgba(20, 26, 24, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100dvh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button {
  font: inherit;
}

.lock-screen {
  position: fixed;
  z-index: 10;
  display: grid;
  inset: 0;
  place-items: center;
  padding: 20px;
  background: var(--bg);
}

.lock-screen.hidden {
  display: none;
}

.lock-panel {
  width: min(100%, 360px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.lock-panel h1 {
  margin-bottom: 10px;
}

.lock-copy {
  margin: 0 0 18px;
  color: var(--muted);
}

.lock-panel input {
  width: 100%;
  min-height: 46px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  outline: none;
}

.lock-panel input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.lock-panel .add-button {
  width: 100%;
}

.lock-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: #dc2626;
  font-size: 14px;
}

.app-shell {
  display: flex;
  min-height: 100dvh;
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 22px 16px 28px;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.topbar {
  display: flex;
  width: min(100%, 620px);
  margin: 0 auto;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.progress {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.status-panel {
  display: flex;
  width: min(100%, 620px);
  min-height: 38px;
  margin: 0 auto;
  padding: 9px 12px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.status-panel.error .status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.add-word-form {
  display: grid;
  width: min(100%, 620px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
}

.add-word-form input {
  min-height: 46px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  outline: none;
}

.add-word-form input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.add-button {
  min-height: 46px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.add-button:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.card {
  width: min(100%, 620px);
  min-height: 420px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.word-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.card-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf9;
  color: var(--blue);
  cursor: pointer;
}

.icon-button:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eef4ff;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.phonetic {
  min-height: 26px;
  margin: 12px 0 30px;
  color: var(--muted);
  font-size: 18px;
}

.meaning-block {
  margin-bottom: 24px;
}

.meaning {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
}

.example-block {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  background: #f6f8fa;
}

.example,
.example-cn {
  margin: 0;
  line-height: 1.7;
}

.example {
  color: #26312d;
  font-size: 17px;
}

.example-cn {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.card-footer {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: grid;
  width: min(100%, 620px);
  margin: 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-weight: 700;
}

.secondary-button:hover {
  border-color: rgba(37, 99, 235, 0.32);
  background: #f0f6ff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

@media (max-width: 520px) {
  .app-shell {
    justify-content: flex-start;
    padding-top: 20px;
  }

  .card {
    min-height: 410px;
    padding: 22px;
  }

  h2 {
    font-size: 40px;
  }

  .meaning {
    font-size: 25px;
  }

}
