:root {
  --cw-vi-font: var(--gg-font-ui-vi, "Plus Jakarta Sans", "Noto Sans", "Segoe UI", Arial, sans-serif);
  --cw-blue: #14a8d4;
  --cw-mint: #2fe5a0;
  --cw-purple: #7510b8;
  --cw-pink: #f36f96;
  --cw-red: #f24822;
  --cw-yellow: #f2d700;
  --cw-orange: #ff9700;
  --cw-navy: #191d27;
  --cw-ink: #2c2f36;
  --cw-muted: #657184;
  --cw-soft: #eef2f5;
  --cw-line: rgba(38, 56, 75, 0.14);
  --cw-card: #ffffff;
  --cw-radius: 18px;
  --cw-shadow: 0 14px 34px rgba(38, 56, 75, 0.12);
  --cw-primary: var(--cw-orange);
  --cw-info: var(--cw-blue);
  --cw-special: var(--cw-purple);
  --cw-primary-text: #8a4300;
  --cw-info-text: #075f7a;
  --cw-special-text: #4b1174;
  --cw-success-text: #08725e;
  --cw-warn-text: #735d00;
  --cw-danger-text: #8f230e;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--cw-ink);
  background: linear-gradient(180deg, #fff8ef 0%, #f3f7f8 100%);
  font-family: var(--gg-font-ui-base, "Plus Jakarta Sans", "Noto Sans", "Segoe UI", Arial, sans-serif);
}
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.48; }

.cw-shell {
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 18px 14px 38px;
}
.cw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.cw-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.cw-brand__goigoi {
  font-size: 20px;
  font-weight: 900;
}
.cw-brand__app {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}
.cw-topbar__status {
  min-width: 0;
  flex: 1;
  color: var(--cw-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cw-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cw-top-control {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 2px solid color-mix(in srgb, var(--cw-line) 72%, transparent);
  border-radius: 12px;
  background: var(--cw-card);
  color: var(--cw-navy);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 0 rgba(25, 29, 39, 0.06);
}
.cw-top-control svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cw-top-control:disabled {
  color: var(--cw-muted);
  background: color-mix(in srgb, var(--cw-soft) 50%, #fff);
}
.cw-top-select {
  max-width: 116px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.cw-icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--cw-line) 72%, transparent);
  border-radius: 12px;
  background: var(--cw-card);
  color: var(--cw-navy);
  box-shadow: 0 2px 0 rgba(25, 29, 39, 0.06);
}
.cw-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cw-panel,
.cw-card,
.cw-result {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius);
  box-shadow: var(--cw-shadow);
}
.cw-panel { padding: clamp(18px, 4vw, 30px); }
.cw-kicker {
  margin-bottom: 8px;
  color: var(--cw-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.cw-title {
  margin: 0;
  color: var(--cw-navy);
  font-size: clamp(36px, 7vw, 68px);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: 0;
}
.cw-subtitle {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--cw-muted);
  font-size: clamp(15px, 2.4vw, 18px);
  line-height: 1.55;
}
.cw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.cw-field {
  display: grid;
  gap: 8px;
}
.cw-field span,
.cw-small-label {
  color: var(--cw-muted);
  font-size: 13px;
  font-weight: 800;
}
.cw-select,
.cw-input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--cw-line);
  border-radius: 14px;
  background: var(--cw-card);
  color: var(--cw-ink);
  padding: 10px 12px;
}
.cw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.cw-sticky-actions {
  position: sticky;
  bottom: 10px;
  z-index: 3;
  border-radius: 18px;
  background: color-mix(in srgb, #fff 84%, transparent);
  padding: 10px 0 0;
}
.cw-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid color-mix(in srgb, var(--cw-line) 72%, transparent);
  border-radius: 14px;
  background: var(--cw-card);
  color: var(--cw-navy);
  padding: 11px 16px;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(25, 29, 39, 0.08);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.cw-btn:not(:disabled):active,
.cw-choice-chip:not(:disabled):active,
.cw-top-control:not(:disabled):active,
.cw-icon-btn:not(:disabled):active,
.cw-record-btn:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(25, 29, 39, 0.1);
}
.cw-btn--primary {
  border-color: color-mix(in srgb, var(--cw-primary) 78%, #7b3600);
  background: var(--cw-primary);
  color: #fff;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--cw-primary) 62%, #7b3600);
}
.cw-btn--info {
  border-color: var(--cw-info);
  background: color-mix(in srgb, var(--cw-info) 14%, #fff);
  color: var(--cw-info-text);
}
.cw-btn--special {
  border-color: var(--cw-special);
  background: color-mix(in srgb, var(--cw-special) 14%, #fff);
  color: var(--cw-special-text);
}
.cw-btn--success {
  border-color: var(--cw-mint);
  background: color-mix(in srgb, var(--cw-mint) 16%, #fff);
  color: var(--cw-success-text);
}
.cw-btn--warn {
  border-color: color-mix(in srgb, var(--cw-yellow) 78%, #a27c00);
  background: color-mix(in srgb, var(--cw-yellow) 30%, #fff);
  color: var(--cw-warn-text);
}

.gg-content-disclosure {
  width: min(1060px, calc(100% - 28px));
  margin: 0 auto 34px;
  border: 1px solid var(--cw-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--cw-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
  box-shadow: 0 8px 20px rgba(38, 56, 75, 0.08);
}

.gg-content-disclosure summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--cw-navy);
  font-weight: 900;
}

.gg-content-disclosure__body {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.gg-content-disclosure__body p {
  margin: 0;
}

.gg-content-disclosure__links a {
  color: var(--cw-primary-text);
  font-weight: 900;
}
.cw-btn--danger {
  border-color: var(--cw-red);
  background: color-mix(in srgb, var(--cw-red) 14%, #fff);
  color: var(--cw-danger-text);
}
.cw-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.cw-metric {
  min-height: 82px;
  border: 1px solid var(--cw-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--cw-soft) 54%, #fff);
  padding: 12px;
}
.cw-metric strong {
  display: block;
  color: var(--cw-navy);
  font-size: 24px;
}
.cw-metric span {
  color: var(--cw-muted);
  font-size: 12px;
  font-weight: 800;
}
.cw-card {
  min-height: min(66vh, 620px);
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(20px, 4.6vw, 44px);
  text-align: center;
}
.cw-card__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cw-muted);
  font-size: 13px;
  font-weight: 800;
}
.cw-chip {
  border: 1px solid var(--cw-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--cw-soft) 48%, #fff);
  padding: 6px 10px;
}
.cw-choice-block {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.cw-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cw-choice-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid color-mix(in srgb, var(--cw-line) 72%, transparent);
  border-radius: 12px;
  background: #fff;
  color: var(--cw-navy);
  padding: 9px 12px;
  font-weight: 900;
  text-align: left;
  box-shadow: 0 2px 0 rgba(25, 29, 39, 0.06);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.cw-choice-chip[data-active="true"] {
  border-color: var(--cw-primary);
  background: color-mix(in srgb, var(--cw-primary) 15%, #fff);
  color: var(--cw-primary-text);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--cw-primary) 26%, transparent),
    0 2px 0 color-mix(in srgb, var(--cw-primary) 38%, rgba(25, 29, 39, 0.08));
}
.cw-choice-chip span {
  color: color-mix(in srgb, currentColor 62%, var(--cw-muted));
  font-size: 12px;
  font-weight: 850;
}
.cw-course-section {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  border-top: 1px solid var(--cw-line);
  padding-top: 22px;
}
.cw-section-head {
  display: grid;
  gap: 4px;
}
.cw-section-head div {
  color: var(--cw-navy);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 950;
  line-height: 1.15;
}
.cw-section-head p {
  margin: 0;
  color: var(--cw-muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}
.cw-stage-list {
  display: grid;
  gap: 10px;
}
.cw-stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 2px solid color-mix(in srgb, var(--cw-line) 72%, transparent);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 2px 0 rgba(25, 29, 39, 0.05);
}
.cw-stage-row[data-next="true"] {
  border-color: color-mix(in srgb, var(--cw-primary) 72%, var(--cw-line));
  background: color-mix(in srgb, var(--cw-primary) 8%, #fff);
}
.cw-stage-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.cw-stage-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
}
.cw-stage-title strong {
  color: var(--cw-navy);
  font-size: 18px;
  font-weight: 950;
}
.cw-stage-title span {
  color: var(--cw-muted);
  font-size: 13px;
  font-weight: 850;
}
.cw-stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cw-stage-meter {
  display: grid;
  gap: 5px;
  color: var(--cw-muted);
  font-size: 12px;
  font-weight: 850;
}
.cw-stage-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cw-soft) 78%, #fff);
}
.cw-stage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cw-primary);
}
.cw-stage-start {
  min-width: 96px;
  min-height: 42px;
  padding: 9px 12px;
}
.cw-extra-panel {
  margin-top: 24px;
  border-top: 1px solid var(--cw-line);
  padding-top: 18px;
}
.cw-extra-summary {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 2px solid color-mix(in srgb, var(--cw-line) 72%, transparent);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  color: var(--cw-navy);
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(25, 29, 39, 0.05);
}
.cw-extra-summary::-webkit-details-marker { display: none; }
.cw-extra-summary strong {
  display: block;
  font-size: 20px;
  font-weight: 950;
}
.cw-extra-summary span {
  display: block;
  margin-top: 2px;
  color: var(--cw-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}
.cw-extra-summary em {
  color: var(--cw-primary-text);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.cw-extra-panel[open] .cw-extra-summary {
  border-color: var(--cw-primary);
  background: color-mix(in srgb, var(--cw-primary) 9%, #fff);
}
.cw-extra-body {
  display: grid;
  gap: 4px;
  padding-top: 14px;
}
.cw-progress-panel {
  display: grid;
  grid-template-columns: minmax(118px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  border: 1px solid var(--cw-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--cw-soft) 35%, #fff);
  padding: 16px;
}
.cw-donut {
  width: min(42vw, 150px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  position: relative;
}
.cw-donut::before {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--cw-line);
}
.cw-donut strong,
.cw-donut span {
  position: relative;
  z-index: 1;
}
.cw-donut strong {
  align-self: end;
  color: var(--cw-ink);
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}
.cw-donut span {
  align-self: start;
  color: var(--cw-muted);
  font-size: 12px;
  font-weight: 850;
}
.cw-status-legend {
  display: grid;
  gap: 8px;
}
.cw-status-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--cw-muted);
  font-weight: 850;
}
.cw-status-row strong {
  color: var(--cw-navy);
}
.cw-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cw-soft);
}
.cw-status-row[data-status="mastered"] .cw-status-dot { background: var(--cw-mint); }
.cw-status-row[data-status="almost_known"] .cw-status-dot,
.cw-status-row[data-status="producible"] .cw-status-dot { background: #58c971; }
.cw-status-row[data-status="shaky"] .cw-status-dot,
.cw-status-row[data-status="almost_producible"] .cw-status-dot { background: #8be02a; }
.cw-status-row[data-status="weak"] .cw-status-dot { background: var(--cw-red); }
.cw-status-row[data-status="wrong"] .cw-status-dot { background: var(--cw-red); }
.cw-status-row[data-status="unseen"] .cw-status-dot { background: #e5e7eb; }
.cw-progress-tools {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}
.cw-record-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 2px solid color-mix(in srgb, var(--cw-line) 72%, transparent);
  border-radius: 12px;
  background: #fff;
  color: var(--cw-navy);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 0 rgba(25, 29, 39, 0.06);
}
.cw-record-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cw-record-detail {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--cw-line);
  padding-top: 10px;
}
.cw-record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--cw-muted);
  font-size: 13px;
  font-weight: 850;
}
.cw-record-row strong {
  color: var(--cw-navy);
}
.cw-session-note {
  margin: 12px 0 0;
  color: var(--cw-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}
.cw-prompt {
  color: var(--cw-navy);
  font-family: var(--cw-vi-font);
  font-size: clamp(42px, 12vw, 92px);
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.cw-answer {
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 850;
  color: var(--cw-navy);
}
.cw-example {
  color: var(--cw-muted);
  font-size: clamp(16px, 3vw, 22px);
  line-height: 1.55;
}
.cw-mark-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.cw-result {
  padding: clamp(18px, 4vw, 30px);
}
.cw-result h2 {
  margin: 0 0 12px;
  color: var(--cw-navy);
  font-size: 30px;
}
.cw-result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--cw-line);
  padding: 10px 0;
  color: var(--cw-muted);
  font-weight: 800;
}
.cw-error {
  border: 1px solid color-mix(in srgb, var(--cw-red) 40%, var(--cw-line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--cw-red) 8%, #fff);
  color: #93271d;
  padding: 14px;
  font-weight: 800;
}

.gg-pseudo-input { display: grid; gap: 8px; }
.gg-pseudo-input__label,
.gg-pseudo-input__helper { color: var(--cw-muted); font-size: 13px; font-weight: 800; }
.gg-pseudo-input__box {
  min-height: 56px;
  display: flex;
  align-items: center;
  border: 1px solid var(--cw-line);
  border-radius: 16px;
  background: #fff;
  padding: 12px 14px;
}
.gg-pseudo-input__flow { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.gg-pseudo-input__value {
  font-family: var(--cw-vi-font);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cw-navy);
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 850;
}
.gg-pseudo-input__value[data-placeholder="true"] { color: var(--cw-muted); }
.gg-pseudo-input__caret {
  color: var(--cw-info);
  font-size: 24px;
  animation: cw-blink 1s step-end infinite;
}
.gg-pseudo-input[data-correct-state="correct"] .gg-pseudo-input__box {
  border-color: var(--cw-mint);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cw-mint) 16%, transparent);
}

.gg-telex-input { display: grid; gap: 10px; }
.gg-telex-input__panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--cw-line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
}
.gg-telex-input__bar {
  display: grid;
  gap: 6px;
}
.gg-telex-input__bar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.gg-telex-input__bar-chip {
  color: var(--cw-muted);
  font-size: 12px;
  font-weight: 850;
}
.gg-telex-input__bar-group--base .gg-telex-input__bar-chip { color: var(--cw-info); }
.gg-telex-input__bar-group--tone .gg-telex-input__bar-chip { color: var(--cw-special); }
.gg-telex-input__keyboard { display: grid; gap: 6px; }
.gg-telex-input__row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}
.gg-telex-input__row[data-row-length="9"] { grid-template-columns: repeat(9, minmax(0, 1fr)); width: 94%; margin-inline: auto; }
.gg-telex-input__row[data-row-length="8"] { grid-template-columns: repeat(8, minmax(0, 1fr)); width: 88%; margin-inline: auto; }
.gg-telex-input__row[data-row-length="7"] { grid-template-columns: repeat(7, minmax(0, 1fr)); width: 82%; margin-inline: auto; }
.gg-telex-input__row--controls {
  grid-template-columns: minmax(0, 1.55fr) minmax(96px, 0.9fr);
  width: min(86%, 520px);
  margin-inline: auto;
}
.gg-telex-input__key {
  position: relative;
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cw-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--cw-soft) 64%, #fff);
  color: var(--cw-navy);
  padding: 13px 8px 7px;
}
.gg-telex-input__key--highlighted-base {
  border-color: var(--cw-info);
  background: color-mix(in srgb, var(--cw-info) 14%, #fff);
}
.gg-telex-input__key--highlighted-tone {
  border-color: var(--cw-special);
  background: color-mix(in srgb, var(--cw-special) 14%, #fff);
}
.gg-telex-input__key--enter {
  border-color: var(--cw-primary);
  background: color-mix(in srgb, var(--cw-primary) 16%, #fff);
}
.gg-telex-input__key-label {
  font-family: var(--cw-vi-font);
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.gg-telex-input__key--wide .gg-telex-input__key-label,
.gg-telex-input__key--enter .gg-telex-input__key-label { font-size: 16px; }
.gg-telex-input__sticker {
  position: absolute;
  top: 5px;
  width: 16px;
  height: 10px;
  display: inline-flex;
  justify-content: center;
  overflow: hidden;
  line-height: 1;
  pointer-events: none;
}
.gg-telex-input__sticker--left { left: 6px; }
.gg-telex-input__sticker--right { right: 6px; }
.gg-telex-input__key[data-kind="base"] .gg-telex-input__sticker,
.gg-telex-input__sticker[data-kind="base"] { color: var(--cw-info); }
.gg-telex-input__key[data-kind="tone"] .gg-telex-input__sticker,
.gg-telex-input__sticker[data-kind="tone"] { color: var(--cw-special); }
.gg-telex-input__sticker-glyph {
  display: block;
  font-family: var(--cw-vi-font);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  transform-origin: center top;
}
.gg-telex-input__sticker:not([data-mask]) .gg-telex-input__sticker-glyph {
  font-size: 10px;
}
.gg-telex-input__sticker[data-mask="accent-top"] .gg-telex-input__sticker-glyph {
  clip-path: inset(0 0 71% 0);
}
.gg-telex-input__sticker[data-mask="breve-top"] .gg-telex-input__sticker-glyph {
  clip-path: inset(0 21% 72% 21%);
}
.gg-telex-input__sticker[data-mask="crossbar"] {
  top: 10px;
  width: 12px;
  height: 7px;
}
.gg-telex-input__sticker[data-mask="crossbar"] .gg-telex-input__sticker-glyph {
  clip-path: inset(44% 0 40% 55%);
  transform: translateX(-5px) translateY(-5px);
}
.gg-telex-input__sticker[data-mask="dot-bottom"] {
  top: auto;
  bottom: 6px;
}
.gg-telex-input__sticker[data-mask="dot-bottom"] .gg-telex-input__sticker-glyph {
  clip-path: inset(81% 0 0 0);
}
.gg-telex-input__sticker[data-shape="nang-dot"]::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

@keyframes cw-blink {
  50% { opacity: 0; }
}

@media (max-width: 720px) {
  .cw-shell { padding-inline: 10px; }
  .cw-topbar { align-items: flex-start; }
  .cw-topbar__status { display: none; }
  .cw-topbar__actions { flex-wrap: wrap; justify-content: flex-end; }
  .cw-login-control span { display: none; }
  .cw-top-select { max-width: 94px; }
  .cw-grid,
  .cw-metric-grid,
  .cw-mark-grid { grid-template-columns: 1fr; }
  .cw-stage-row { grid-template-columns: 1fr; }
  .cw-stage-start { width: 100%; }
  .cw-extra-summary { grid-template-columns: 1fr; }
  .cw-progress-panel { grid-template-columns: 1fr; }
  .cw-choice-chip { flex: 1 1 auto; justify-content: center; }
  .cw-card { min-height: 58vh; }
  .cw-actions .cw-btn { flex: 1 1 100%; }
  .gg-telex-input__key { min-height: 46px; padding: 12px 6px 6px; }
  .gg-telex-input__key-label { font-size: 18px; }
  .gg-telex-input__row { gap: 4px; }
}
.study-rating-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.study-rating-btn {
  --study-rating-fill: var(--cw-blue);
  --study-rating-ink: var(--cw-navy);
  position: relative;
  min-height: 66px;
  display: grid;
  grid-template-rows: 22px auto;
  place-content: center;
  gap: 3px;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--study-rating-fill) 46%, var(--cw-navy));
  border-radius: 15px;
  background:
    linear-gradient(135deg, #fff 0 93%, color-mix(in srgb, var(--study-rating-fill) 8%, #fff) 93% 100%);
  color: var(--study-rating-ink);
  padding: 8px 6px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--study-rating-fill) 22%, transparent);
  text-align: center;
  transform: none;
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease, color 130ms ease;
}

.study-rating-btn--weak,
.study-rating-btn--wrong {
  --study-rating-fill: var(--cw-red);
  --study-rating-ink: var(--cw-danger-text);
}

.study-rating-btn--still,
.study-rating-btn--almost {
  --study-rating-fill: var(--cw-yellow);
  --study-rating-ink: var(--cw-warn-text);
}

.study-rating-btn--remembered,
.study-rating-btn--correct {
  --study-rating-fill: var(--cw-mint);
  --study-rating-ink: var(--cw-success-text);
}

.study-rating-btn__icon {
  width: 22px;
  height: 22px;
  justify-self: center;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.study-rating-btn--remembered .study-rating-btn__icon,
.study-rating-btn--correct .study-rating-btn__icon {
  filter: drop-shadow(0 0 2px color-mix(in srgb, var(--study-rating-fill) 30%, transparent));
  stroke-width: 2.65;
}

.study-rating-btn__label {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.05;
}

@media (hover: hover) {
  .study-rating-btn:not(:disabled):hover {
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--study-rating-fill) 3%, #fff) 0 91%, color-mix(in srgb, var(--study-rating-fill) 11%, #fff) 91% 100%);
    color: var(--study-rating-ink);
    box-shadow: 0 2px 3px color-mix(in srgb, var(--study-rating-fill) 26%, transparent);
    transform: translateY(-1px);
  }
}

.study-rating-btn:not(:disabled):active {
  background: color-mix(in srgb, var(--study-rating-fill) 7%, #fff);
  box-shadow: none;
  transform: none;
}

.study-rating-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--study-rating-fill) 68%, var(--cw-navy));
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .study-rating-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .study-rating-btn {
    min-height: 54px;
    grid-template-rows: 19px auto;
    gap: 3px;
    border-radius: 12px;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--study-rating-fill) 22%, transparent);
    padding: 6px 3px;
  }

  .study-rating-btn__icon {
    width: 19px;
    height: 19px;
  }

  .study-rating-btn__label {
    font-size: 11px;
  }
}
