.abr-english-patterns-root {
  --abr-ep-font: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --abr-ep-text: #1f2937;
  --abr-ep-muted: #6b7280;
  --abr-ep-border: #e5e7eb;
  --abr-ep-radius: 14px;
  --abr-ep-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  font-family: var(--abr-ep-font);
  color: var(--abr-ep-text);
  line-height: 1.5;
  max-width: 720px;
  margin: 0 auto;
}

.abr-english-patterns-root * {
  box-sizing: border-box;
}

.abr-ep-app {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.abr-ep-header {
  margin-bottom: 0.25rem;
}

.abr-ep-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.abr-ep-panel {
  background: #fff;
  border: 1px solid var(--abr-ep-border);
  border-radius: var(--abr-ep-radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--abr-ep-shadow);
}

.abr-ep-panel.hidden {
  display: none !important;
}

.abr-ep-section-title {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.abr-ep-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
}

.abr-ep-level-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 92px;
  padding: 0.75rem 0.5rem;
  border: 2px solid var(--abr-ep-border);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  text-align: center;
}

.abr-ep-level-card:hover:not(.is-disabled) {
  border-color: #93c5fd;
  background: #f8fbff;
}

.abr-ep-level-card.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.abr-ep-level-card.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.abr-ep-level-emoji-lg {
  font-size: 1.6rem;
  line-height: 1;
}

.abr-ep-level-label {
  font-size: 0.95rem;
  font-weight: 700;
}

.abr-ep-level-label-en {
  font-size: 0.75rem;
  color: var(--abr-ep-muted);
}

.abr-ep-day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.abr-ep-day-nav-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.abr-ep-day-progress {
  margin: 0;
  font-size: 0.9rem;
  color: var(--abr-ep-muted);
}

.abr-ep-day-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.abr-ep-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.abr-ep-btn-secondary {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #111827;
}

.abr-ep-btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.abr-ep-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.abr-ep-day-complete {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.abr-ep-day-complete input {
  width: 1rem;
  height: 1rem;
  accent-color: #3b82f6;
}

.abr-ep-patterns-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.abr-ep-patterns-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.abr-ep-pattern-count {
  font-size: 0.85rem;
  color: var(--abr-ep-muted);
  white-space: nowrap;
}

.abr-ep-patterns-hint {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--abr-ep-muted);
}

.abr-ep-pattern-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.abr-ep-pattern-card {
  border: 2px solid #fca5a5;
  border-radius: 14px;
  background: #fff7f7;
  overflow: hidden;
}

.abr-ep-pattern-card[data-color="1"] {
  border-color: #86efac;
  background: #f3fdf6;
}

.abr-ep-pattern-card[data-color="2"] {
  border-color: #fcd34d;
  background: #fffbeb;
}

.abr-ep-pattern-card[data-color="3"] {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.abr-ep-pattern-card[data-color="4"] {
  border-color: #fca5a5;
  background: #fff7f7;
}

.abr-ep-pattern-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.abr-ep-pattern-main {
  flex: 1;
  min-width: 0;
}

.abr-ep-pattern-en {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.abr-ep-pattern-ko {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: #374151;
}

.abr-ep-pattern-hint {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.abr-english-patterns-root .abr-ep-speak-btn {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid #9ca3af !important;
  border-radius: 999px;
  background: #ffffff !important;
  color: #1f2937 !important;
  cursor: pointer;
  padding: 0 !important;
  line-height: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.abr-english-patterns-root .abr-ep-speak-btn:hover {
  background: #f3f4f6 !important;
  border-color: #6b7280 !important;
  color: #111827 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

.abr-english-patterns-root .abr-ep-speak-icon {
  display: block;
  pointer-events: none;
}

.abr-ep-chevron {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #6b7280;
  transition: transform 0.2s;
}

.abr-ep-pattern-card.is-open .abr-ep-chevron {
  transform: rotate(180deg);
}

.abr-ep-examples {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.abr-ep-pattern-card.is-open .abr-ep-examples {
  display: block;
}

.abr-ep-example {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.abr-ep-example:last-child {
  border-bottom: 0;
}

.abr-ep-example-text {
  flex: 1;
  min-width: 0;
}

.abr-ep-example-en {
  font-weight: 600;
  font-size: 0.95rem;
}

.abr-ep-example-ko {
  margin-top: 0.15rem;
  font-size: 0.88rem;
  color: #4b5563;
}

.abr-ep-empty-msg {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 10px;
}

.abr-ep-empty-msg.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .abr-ep-title {
    font-size: 1.45rem;
  }

  .abr-ep-level-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
