:root {
  color-scheme: light;
  --bg: #f7f8f6;
  --panel: #ffffff;
  --ink: #141815;
  --muted: #6c746f;
  --line: #e3e6e1;
  --accent: #0f6f5f;
  --accent-2: #9b7a42;
  --accent-3: #1f364d;
  --soft: #f1f5f2;
  --soft-warm: #f6f1e8;
  --danger: #a33a3a;
  --shadow: 0 18px 45px rgba(20, 24, 21, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button, input, select, textarea { font: inherit; }

button, .file-button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

button:hover, .file-button:hover { background: #0b5d50; border-color: #0b5d50; }

button.secondary { background: var(--panel); color: var(--ink); border-color: var(--line); }
button.secondary:hover { background: var(--soft); }
button.danger { color: var(--danger); }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: 0;
}

textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 107, 91, 0.14); }

.landing-page {
  min-height: 100vh;
  display: none;
  padding: 28px min(5vw, 64px) 48px;
}

.landing-page.visible { display: grid; grid-template-rows: auto 1fr; }

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.landing-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-hero {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: min(8vw, 92px);
  padding: 58px 0 28px;
}

.landing-copy h1 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7.4vw, 82px);
  line-height: 0.98;
  font-weight: 760;
}

.landing-copy p:not(.eyebrow) {
  max-width: 580px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.landing-cta { margin-top: 28px; }
.landing-cta button { min-height: 46px; padding: 0 18px; }

.live-users {
  width: min(100%, 410px);
  margin-top: 28px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 10px 1fr 1fr;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.8);
}

.live-users > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #30b36d;
  box-shadow: 0 0 0 5px rgba(48, 179, 109, 0.14);
}

.live-users strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.live-users small {
  color: var(--muted);
  font-size: 12px;
}

.landing-preview {
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  display: grid;
  align-content: space-between;
  gap: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.preview-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preview-head strong { font-size: 30px; }

.preview-ring {
  width: min(100%, 270px);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 18px solid #edf2ef;
  border-top-color: var(--accent);
  border-right-color: #87aaa0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
}

.preview-ring strong {
  display: block;
  font-size: 54px;
  line-height: 1;
}

.preview-ring span { color: var(--muted); }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.preview-grid span {
  height: 16px;
  border-radius: 4px;
  background: #ecefed;
}

.preview-grid span[data-level="1"] { background: #cfe2dc; }
.preview-grid span[data-level="2"] { background: #8fbfb3; }
.preview-grid span[data-level="3"] { background: #479280; }
.preview-grid span[data-level="4"] { background: #0f6f5f; }

.app-shell { width: min(1440px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 32px; }
.app-shell.app-hidden { display: none; }

.global-footer {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.global-footer nav {
  display: flex;
  justify-content: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.global-footer a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.global-footer a:hover { color: var(--accent); }
.global-footer p { margin: 0; }

.policy-page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 8px;
}

.policy-header {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.policy-header a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
}

.policy-header h1 {
  margin: 14px 0 8px;
  font-size: clamp(34px, 7vw, 58px);
  letter-spacing: 0;
}

.policy-header p {
  margin: 0;
  color: var(--muted);
}

.policy-content {
  display: grid;
  gap: 18px;
}

.policy-content section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.policy-content h2 { margin-bottom: 8px; }

.policy-content p,
.policy-content li {
  color: var(--muted);
  line-height: 1.65;
}

.policy-content ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding: 8px 0 20px;
}

.brand-block { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(20, 24, 21, 0.12);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

h1, h2, p { margin-top: 0; }
h1 { max-width: 780px; margin-bottom: 0; font-size: clamp(28px, 4vw, 52px); line-height: 1.03; letter-spacing: 0; font-weight: 760; }
h2 { margin-bottom: 0; font-size: 17px; }

.top-actions, .button-row, .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.top-actions { align-items: center; }

.notification-menu {
  position: relative;
}

.notification-button {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-color: var(--line);
  border-radius: 50%;
  position: relative;
  background: #fff;
  color: var(--ink);
}

.notification-button[hidden] { display: none; }

.notification-button:hover {
  border-color: rgba(15, 111, 95, 0.36);
  background: var(--soft);
  color: var(--accent);
}

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

.notification-button span {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.notification-button span[hidden] { display: none; }

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  width: min(340px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: none;
  background: var(--panel);
  box-shadow: 0 18px 46px rgba(20, 24, 21, 0.13);
}

.notification-dropdown.open {
  display: grid;
  gap: 10px;
}

.notification-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.notification-head strong { font-size: 14px; }

.notification-head small {
  color: var(--muted);
  font-size: 12px;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
}

.notification-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.notification-item p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.notification-item small {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.account-menu {
  position: relative;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: none;
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(20, 24, 21, 0.11);
}

.account-menu.open .account-dropdown,
.account-dropdown.open { display: grid; gap: 4px; }

.account-dropdown button,
.account-dropdown a {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--ink);
  min-height: 42px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 700;
}

.account-dropdown button:hover,
.account-dropdown a:hover { background: var(--soft); }
.account-dropdown button.danger { color: var(--danger); }

.account-page {
  display: none;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.account-page.visible { display: block; }

.account-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.account-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.account-details div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.account-details dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.account-details dd {
  margin: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.account-profile-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.account-analytics {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.account-analytics output {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.analytics-card {
  min-width: 0;
  min-height: 290px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  align-content: start;
  gap: 13px;
}

.analytics-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.analytics-head h3 {
  margin: 0;
  font-size: 15px;
}

.analytics-head span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pie-chart {
  width: min(100%, 150px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(20, 24, 31, 0.08);
}

.pie-chart::after {
  content: "";
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(20, 24, 31, 0.06);
}

.analytics-legend {
  display: grid;
  gap: 8px;
}

.analytics-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.analytics-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.analytics-legend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-legend strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.geo-card {
  grid-column: span 1;
}

.geo-map {
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 38%, rgba(76, 170, 181, 0.17) 0 18%, transparent 19%),
    radial-gradient(circle at 70% 42%, rgba(15, 111, 95, 0.13) 0 22%, transparent 23%),
    radial-gradient(circle at 50% 72%, rgba(200, 169, 93, 0.16) 0 14%, transparent 15%),
    linear-gradient(180deg, #f8faf8, #eef4f1);
}

.geo-map span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(10px * var(--s));
  height: calc(10px * var(--s));
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(15, 111, 95, 0.12);
}

.geo-list {
  display: grid;
  gap: 8px;
}

.geo-list div {
  display: grid;
  grid-template-columns: minmax(74px, 0.9fr) minmax(70px, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.geo-list span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-list strong {
  font-variant-numeric: tabular-nums;
}

.geo-list meter {
  width: 100%;
  height: 7px;
  border: 0;
}

.geo-list meter::-webkit-meter-bar {
  background: #e8ece9;
  border: 0;
  border-radius: 999px;
}

.geo-list meter::-webkit-meter-optimum-value {
  background: var(--accent);
  border-radius: 999px;
}

.geo-list meter::-moz-meter-bar {
  background: var(--accent);
  border-radius: 999px;
}

.account-profile-form output {
  min-height: 18px;
  color: var(--accent);
  font-size: 13px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-field {
  display: grid;
  gap: 7px;
}

.profile-field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dua-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 8px;
}

.dua-header {
  display: grid;
  gap: 8px;
}

.dua-header .eyebrow { margin: 8px 0 0; }

.dua-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dua-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(20, 24, 21, 0.06);
}

.dua-illustration {
  min-height: 100%;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0)),
    var(--soft);
}

.dua-illustration span,
.dua-illustration i,
.dua-illustration b {
  position: absolute;
  display: block;
}

.dua-illustration span {
  inset: auto 20px 22px;
  height: 34%;
  border-radius: 999px 999px 10px 10px;
  background: rgba(15, 111, 95, 0.18);
}

.dua-illustration i {
  width: 62px;
  height: 62px;
  left: 26px;
  top: 28px;
  border-radius: 50%;
  background: rgba(200, 169, 93, 0.36);
}

.dua-illustration b {
  width: 76px;
  height: 8px;
  right: 22px;
  bottom: 52px;
  border-radius: 999px;
  background: rgba(20, 24, 31, 0.16);
}

.dua-good { background: linear-gradient(160deg, #f4f0df, #e8f4ee); }
.dua-good i { box-shadow: 58px 38px 0 -16px rgba(76, 170, 181, 0.34); }
.dua-forgiveness { background: linear-gradient(160deg, #eef4f1, #f7f4ee); }
.dua-forgiveness span { height: 50%; border-radius: 50% 50% 8px 8px; background: rgba(76, 170, 181, 0.2); }
.dua-forgiveness b { transform: rotate(-18deg); background: rgba(15, 111, 95, 0.3); }
.dua-repentance { background: linear-gradient(160deg, #eef7f2, #f8f5ec); }
.dua-repentance span { height: 62px; left: 34px; right: 34px; bottom: 28px; border-radius: 50% 50% 12px 12px; background: rgba(15, 111, 95, 0.18); }
.dua-repentance i { width: 52px; height: 52px; left: 30px; top: 32px; background: rgba(200, 169, 93, 0.34); box-shadow: 58px 12px 0 -14px rgba(76, 170, 181, 0.3); }
.dua-repentance b { width: 58px; height: 58px; right: 32px; bottom: 46px; border-radius: 50%; background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.78) 0 12%, rgba(15, 111, 95, 0.28) 13% 100%); }
.dua-worry { background: linear-gradient(160deg, #eef1f3, #f6efe5); }
.dua-worry i { width: 80px; height: 34px; border-radius: 999px; background: rgba(20, 24, 31, 0.14); }
.dua-worry b { width: 42px; height: 42px; border: 3px solid rgba(15, 111, 95, 0.36); border-radius: 50%; background: transparent; }
.dua-guidance { background: linear-gradient(160deg, #eff7f2, #edf3f7); }
.dua-guidance span { clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; background: rgba(15, 111, 95, 0.22); }
.dua-guidance b { height: 46px; width: 7px; right: 50px; bottom: 34px; background: rgba(200, 169, 93, 0.62); }
.dua-knowledge { background: linear-gradient(160deg, #f8f5ec, #edf7f4); }
.dua-knowledge span { height: 28px; border-radius: 4px; background: rgba(20, 24, 31, 0.13); box-shadow: 0 -14px 0 rgba(15, 111, 95, 0.14), 0 -28px 0 rgba(200, 169, 93, 0.18); }
.dua-knowledge i { border-radius: 8px; transform: rotate(-7deg); }
.dua-worship { background: linear-gradient(160deg, #edf7f4, #f4f0df); }
.dua-worship span { width: 84px; height: 84px; left: 43px; bottom: 30px; border-radius: 50%; background: transparent; border: 10px solid rgba(15, 111, 95, 0.18); }
.dua-worship i { left: 66px; top: 38px; background: rgba(15, 111, 95, 0.24); }
.dua-prayer { background: linear-gradient(160deg, #f4f0df, #eef4f1); }
.dua-prayer span { height: 58px; border-radius: 8px 8px 22px 22px; background: rgba(15, 111, 95, 0.2); }
.dua-prayer b { width: 64px; height: 64px; border-radius: 50% 50% 50% 8px; transform: rotate(45deg); background: rgba(200, 169, 93, 0.28); }
.dua-character { background: linear-gradient(160deg, #f7f4ee, #eef7f2); }
.dua-character i { width: 48px; height: 48px; box-shadow: 44px 22px 0 -12px rgba(15, 111, 95, 0.28); }
.dua-character b { width: 82px; background: rgba(76, 170, 181, 0.34); }
.dua-wellbeing { background: linear-gradient(160deg, #eff7f2, #f8f5ec); }
.dua-wellbeing span { width: 82px; height: 82px; left: 44px; bottom: 34px; border-radius: 50%; background: rgba(15, 111, 95, 0.15); }
.dua-wellbeing i { width: 18px; height: 74px; left: 76px; top: 42px; border-radius: 999px; background: rgba(15, 111, 95, 0.32); }
.dua-wellbeing b { width: 74px; height: 18px; left: 48px; bottom: 69px; background: rgba(15, 111, 95, 0.32); }
.dua-sleep { background: linear-gradient(160deg, #eef1f3, #f8f5ec); }
.dua-sleep i { left: 76px; width: 46px; height: 46px; box-shadow: -16px 0 0 8px rgba(238, 241, 243, 0.95); background: rgba(200, 169, 93, 0.58); }
.dua-sleep span { height: 38px; border-radius: 999px; }
.dua-waking { background: linear-gradient(160deg, #f8f5ec, #edf7f4); }
.dua-waking i { box-shadow: 0 0 0 16px rgba(200, 169, 93, 0.12), 0 0 0 32px rgba(200, 169, 93, 0.08); }
.dua-waking b { width: 96px; height: 2px; bottom: 62px; background: rgba(15, 111, 95, 0.28); }
.dua-light { background: linear-gradient(160deg, #fff8df, #edf7f4); }
.dua-light i { box-shadow: 0 0 0 20px rgba(200, 169, 93, 0.12), 0 0 0 42px rgba(200, 169, 93, 0.08); }
.dua-light span { background: linear-gradient(180deg, rgba(200, 169, 93, 0.34), rgba(15, 111, 95, 0.16)); }

.dua-copy {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.dua-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.dua-card-head .eyebrow { margin: 0; }

.dua-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.dua-copy h2 {
  font-size: 20px;
  line-height: 1.25;
}

.dua-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.dua-copy .dua-arabic {
  color: var(--ink);
  font-family: "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.9;
}

.dua-transliteration {
  color: var(--accent-2);
  font-weight: 700;
}

.dua-copy small {
  color: var(--ink);
  line-height: 1.5;
  font-weight: 700;
}

.learn-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 8px;
}

.learn-header {
  display: grid;
  gap: 8px;
}

.learn-header .eyebrow { margin: 8px 0 0; }

.learn-overview {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 18px;
  box-shadow: 0 16px 40px rgba(20, 24, 21, 0.05);
}

.learn-overview h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.learn-overview p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.learn-meter {
  min-height: 92px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
}

.learn-meter span {
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(76, 170, 181, 0.78), rgba(15, 111, 95, 0.92));
}

.learn-meter span[data-step="1"] { min-height: 23px; }
.learn-meter span[data-step="2"] { min-height: 28px; }
.learn-meter span[data-step="3"] { min-height: 33px; }
.learn-meter span[data-step="4"] { min-height: 38px; }
.learn-meter span[data-step="5"] { min-height: 43px; }
.learn-meter span[data-step="6"] { min-height: 48px; }
.learn-meter span[data-step="7"] { min-height: 53px; }
.learn-meter span[data-step="8"] { min-height: 58px; }
.learn-meter span[data-step="9"] { min-height: 63px; }
.learn-meter span[data-step="10"] { min-height: 68px; }

.learn-grid {
  display: grid;
  gap: 12px;
  counter-reset: phases;
}

.learn-phase {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  box-shadow: 0 12px 34px rgba(20, 24, 21, 0.045);
}

.phase-number {
  width: 68px;
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 24px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.learn-phase h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.learn-phase p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.learn-phase ul {
  margin: 12px 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.learn-phase strong {
  display: block;
  color: var(--ink);
  line-height: 1.5;
}

.lesson-deck {
  margin: 14px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lesson-deck-title {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.flash-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}

.flash-card[open] {
  background: #fff;
  box-shadow: 0 10px 26px rgba(20, 24, 21, 0.06);
}

.flash-card summary {
  min-height: 132px;
  padding: 13px;
  cursor: pointer;
  display: grid;
  align-content: start;
  gap: 7px;
  list-style: none;
}

.flash-card summary::-webkit-details-marker { display: none; }

.flash-card summary::after {
  content: "Practice";
  width: max-content;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 111, 95, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
}

.flash-card[open] summary::after { content: "Review"; }

.flash-card em {
  color: var(--accent-2);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.flash-card b {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.flash-card span {
  color: var(--muted);
  line-height: 1.5;
}

.flash-card-body {
  padding: 0 13px 13px;
  display: grid;
  gap: 10px;
}

.flash-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.flash-card-body strong {
  padding: 10px;
  border-radius: 7px;
  background: var(--soft-warm);
  color: var(--ink);
  font-size: 13px;
}

.flash-card-body .arabic-practice {
  color: var(--accent);
  font-family: "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.7;
}

.letter-strip {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent);
  font-family: "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.8;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(10, 12, 11, 0.58);
  backdrop-filter: blur(9px);
}

.auth-overlay.open { display: grid; }

.auth-modal {
  width: min(100%, 520px);
  min-height: 560px;
  padding: 24px min(7vw, 50px) 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #1c201f;
  color: #f4f6f8;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.auth-kicker {
  margin: 0 0 6px;
  text-align: center;
  color: #f3f5f7;
  font-size: 15px;
}

.auth-brand {
  margin: 0 0 28px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  color: #f8f9fa;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 44px;
  margin-bottom: 30px;
  padding: 5px;
  border-radius: 999px;
  background: #303635;
}

.auth-tab {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f4f6f8;
  font-weight: 500;
}

.auth-tab:hover { background: rgba(255, 255, 255, 0.06); }
.auth-tab.active, .auth-tab.active:hover { background: #171b1a; }

.auth-form { display: grid; gap: 11px; }

.auth-form input {
  min-height: 49px;
  border: 1px solid #ccd3d0;
  border-radius: 7px;
  background: transparent;
  color: #f8fafc;
  padding: 0 15px;
}

.auth-form input::placeholder { color: #c9d3df; }
.auth-form input:focus { border-color: #76c7bb; box-shadow: 0 0 0 3px rgba(118, 199, 187, 0.16); }

.password-field {
  position: relative;
  display: grid;
}

.password-field input { padding-right: 54px; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  transform: translateY(-50%);
  background: transparent;
  color: #9aa1aa;
}

.password-toggle:hover { background: rgba(255, 255, 255, 0.07); }

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.auth-link {
  min-height: auto;
  justify-self: end;
  border: 0;
  background: transparent;
  color: #76c7bb;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
}

.auth-link:hover { background: transparent; color: #9adbd2; }

.auth-message {
  min-height: 19px;
  margin: -2px 0 0;
  color: #f1b6a7;
  font-size: 13px;
}

.auth-message.success { color: #8ddfc1; }

.auth-submit {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: #76c7bb;
  color: #071310;
  font-weight: 800;
}

.auth-submit:hover { background: #91d6cc; }

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 26px;
  margin: 31px 0 32px;
}

.auth-divider span { height: 1px; background: #c9ced5; }
.auth-divider strong { color: #afb7c0; font-size: 13px; font-weight: 500; }

.social-row {
  display: grid;
  grid-template-columns: repeat(2, 54px);
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.social-button {
  min-height: 44px;
  border: 1px solid #d8dce2;
  border-radius: 9px;
  background: transparent;
  color: #f8fafc;
  font-size: 25px;
  font-weight: 900;
}

.google-signin-slot {
  position: relative;
  min-height: 44px;
  width: 54px;
  max-width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
}

.google-visible-button {
  width: 54px;
  height: 44px;
  display: grid;
  place-items: center;
}

.google-visible-button svg,
.social-button.google svg {
  width: 22px;
  height: 22px;
  display: block;
}

.google-signin-slot.has-gsi .google-visible-button {
  pointer-events: none;
}

.google-gsi-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.01;
}

.google-signin-slot > div,
.google-signin-slot iframe {
  max-width: 100%;
}

.social-button:hover { background: rgba(255, 255, 255, 0.07); border-color: #f2f4f7; }
.social-button.google { color: #fbbc05; font-family: Arial, sans-serif; }
.social-button.x { color: #f8fafc; font-family: Arial, sans-serif; font-size: 21px; }

.auth-back {
  min-height: 34px;
  margin: 29px auto 0;
  border: 0;
  background: transparent;
  color: #f4f6f8;
  padding: 0;
  font-weight: 800;
}

.auth-back:hover { background: transparent; color: #cdd5dd; }
.auth-back span { margin-right: 8px; font-size: 24px; line-height: 0; }

body.auth-locked { overflow: hidden; }

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "focus side" "library library";
  gap: 18px;
  align-items: start;
}

.dashboard.dashboard-hidden { display: none; }

.focus-panel, .side-panel, .library-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.focus-panel { grid-area: focus; padding: 20px; }
.side-panel { grid-area: side; position: sticky; top: 16px; padding: 16px; }
.library-panel { grid-area: library; padding: 18px; }

.panel-head, .section-head, .library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-badge {
  min-width: 92px;
  min-height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  text-transform: capitalize;
}
.status-new { background: #eef0ea; color: #59625b; }
.status-learning { background: #edf3f7; color: #1f526b; }
.status-review { background: #f5efe3; color: #7c622c; }
.status-memorized { background: #e4f1ec; color: #0f6f5f; }

.progress-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  align-items: center;
  gap: 20px;
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.progress-ring-copy {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.progress-hero svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #e1e8e3; stroke-width: 12; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset 220ms ease; }
.progress-hero strong { display: block; font-size: clamp(44px, 8vw, 82px); line-height: 0.95; letter-spacing: 0; }
.progress-hero span, .muted { color: var(--muted); }

.accumulation-view {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.jar-stage {
  min-height: 112px;
  display: grid;
  grid-template-columns: 1fr 38px 0.72fr;
  align-items: end;
  gap: 12px;
}

.jar {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(36, 44, 55, 0.24);
  border-top-width: 3px;
  border-radius: 10px 10px 18px 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.08) 34%, rgba(255, 255, 255, 0.32) 72%, rgba(255, 255, 255, 0.1)),
    rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 12px rgba(255, 255, 255, 0.42), inset 0 -10px 18px rgba(24, 31, 38, 0.08);
}

.jar::before {
  content: "";
  position: absolute;
  inset: 10px 8px 8px;
  border-radius: inherit;
  background-image:
    radial-gradient(circle at center, rgba(76, 170, 181, 0.82) 0 2px, transparent 2.4px),
    radial-gradient(circle at center, rgba(20, 24, 31, 0.24) 0 1.6px, transparent 2px);
  background-size: 10px 10px, 14px 14px;
  background-position: 0 0, 5px 6px;
  opacity: 0.76;
}

.jar-total {
  height: 106px;
}

.jar-completed {
  height: 84px;
}

.jar-completed::before {
  opacity: 0.12;
}

.jar-completed span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  min-height: 3px;
  background:
    radial-gradient(circle at center, rgba(248, 250, 252, 0.85) 0 2px, transparent 2.4px) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(76, 170, 181, 0.82), rgba(15, 111, 95, 0.9));
  transition: height 220ms ease;
}

.jar-transfer {
  height: 2px;
  margin-bottom: 42px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.jar-transfer::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin-left: auto;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent);
}

.accumulation-view p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.accumulation-view blockquote {
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.accumulation-view blockquote p { margin-bottom: 4px; color: var(--muted); }
.accumulation-view cite { color: var(--text); font-style: normal; font-weight: 800; }

.quick-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.quick-stats div { min-height: 78px; border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: #fff; }
.quick-stats strong { display: block; font-size: 25px; }
.quick-stats span { color: var(--muted); font-size: 13px; }

.session-form { display: grid; gap: 11px; }
.session-form label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: center; }
.form-grid label { align-self: end; }

.tool-section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.tool-section:first-child { padding-top: 0; }
.tool-section:last-child { border-bottom: 0; padding-bottom: 0; }
.small-button { min-height: 34px; min-width: 64px; padding: 0 10px; font-size: 13px; }

.compact-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.compact-list li { border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.compact-list small { color: var(--muted); white-space: nowrap; }

.review-select {
  min-height: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 3px;
  flex: 1;
}

.review-select:hover span { color: var(--accent); }
.review-select span { overflow-wrap: anywhere; }
.review-select small { white-space: normal; }
.reminder-button { flex: 0 0 auto; }

.reminder-form {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 9px;
}

.reminder-form[hidden] { display: none; }

.reminder-form .section-head {
  align-items: start;
}

.reminder-form h3 {
  margin: 0;
  font-size: 15px;
}

.reminder-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.reminder-form output {
  min-height: 18px;
  color: var(--accent);
  font-size: 13px;
}

.icon-button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
}

.drill-card { margin: 12px 0; min-height: 120px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); padding: 12px; display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 12px; }
.drill-thumb {
  width: 88px;
  aspect-ratio: 1;
  border-radius: 7px;
  display: block;
  object-fit: cover;
  background: #fff;
}
.drill-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.drill-card span { color: var(--accent-2); font-weight: 900; }
.drill-card strong { font-size: 26px; }
.drill-card strong,
.surah-title strong {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.drill-card strong b,
.surah-title strong b {
  font-family: "Times New Roman", serif;
  font-size: 0.92em;
  font-weight: 800;
  color: var(--accent);
}
.drill-card small { color: var(--muted); }

.library-toolbar { align-items: end; margin-bottom: 16px; }
.filters { justify-content: flex-end; }
.filters input { min-width: 220px; }
.filters select { width: auto; min-width: 150px; }

.surah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.surah-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 13px; display: grid; gap: 10px; }
.surah-card[data-active="true"] { border-color: rgba(15, 111, 95, 0.55); box-shadow: 0 0 0 3px rgba(15, 111, 95, 0.09); }
.surah-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  display: block;
  object-fit: cover;
  background: var(--soft);
}
.surah-title { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.surah-title strong { font-size: 16px; }
.surah-title span { color: var(--muted); font-variant-numeric: tabular-nums; }
.surah-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.mini-track { height: 7px; border-radius: 999px; background: #e8ece9; overflow: hidden; }
.mini-fill { height: 100%; width: 0%; background: var(--accent); }
.card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.card-actions select { padding: 8px; }
.card-actions button { min-height: 36px; }

.empty { margin: 10px 0 0; color: var(--muted); }

@media (max-width: 980px) {
  .topbar, .library-toolbar { align-items: start; flex-direction: column; }
  .dashboard { grid-template-columns: 1fr; grid-template-areas: "focus" "side" "library"; }
  .side-panel { position: static; }
  .landing-hero { grid-template-columns: 1fr; padding-top: 34px; }
  .landing-preview { min-height: 380px; }
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dua-grid { grid-template-columns: 1fr; }
  .learn-overview { grid-template-columns: 1fr; }
  .lesson-deck { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .app-shell { width: min(100% - 20px, 1440px); padding-top: 12px; }
  .landing-page { padding: 14px 14px 28px; }
  .landing-nav { align-items: start; }
  .landing-brand .brand-mark { width: 48px; height: 48px; font-size: 28px; }
  .live-users { grid-template-columns: 10px 1fr; }
  .live-users div:last-child { grid-column: 2; }
  .landing-copy h1 { font-size: 42px; }
  .landing-copy p:not(.eyebrow) { font-size: 16px; }
  .landing-cta button { flex: 1 1 160px; }
  .landing-preview { min-height: 330px; padding: 18px; }
  .preview-ring { width: min(100%, 220px); }
  .brand-block { align-items: start; }
  .brand-mark { width: 48px; height: 48px; font-size: 28px; }
  .top-actions button, .top-actions .file-button { flex: 1 1 120px; }
  .top-actions .notification-button { flex: 0 0 42px; }
  .progress-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .progress-ring-copy { grid-template-columns: 1fr; justify-items: center; }
  .accumulation-view { width: min(100%, 360px); }
  .quick-stats, .form-grid { grid-template-columns: 1fr 1fr; }
  .filters, .filters input, .filters select { width: 100%; }
  .surah-grid { grid-template-columns: 1fr; }
  .account-page-head { align-items: start; flex-direction: column; }
  .profile-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .dua-page { width: min(100% - 20px, 1180px); padding-top: 12px; }
  .dua-card { grid-template-columns: 1fr; }
  .dua-illustration { min-height: 150px; }
  .dua-card-head { flex-direction: column; }
  .dua-card-head span { text-align: left; }
  .dua-copy .dua-arabic { font-size: 22px; }
  .learn-page { width: min(100% - 20px, 1180px); padding-top: 12px; }
  .learn-phase { grid-template-columns: 1fr; }
  .phase-number { width: 58px; font-size: 20px; }
  .learn-meter { min-height: 72px; gap: 4px; }
  .letter-strip { font-size: 24px; }
  .auth-overlay { padding: 0; align-items: stretch; }
  .auth-modal { width: 100%; min-height: 100vh; padding-top: 25px; }
  .social-row { grid-template-columns: repeat(2, 54px); }
}

.contribution-panel,
.journey-panel {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contribution-panel output,
.journey-panel output {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.journey-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.journey-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.journey-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.journey-legend i[data-status="new"] { background: #d7dcd7; }
.journey-legend i[data-status="learning"] { background: #4caab5; }
.journey-legend i[data-status="review"] { background: #c8a95d; }
.journey-legend i[data-status="memorized"] { background: #0f6f5f; }

.journey-beads {
  min-height: 210px;
  display: flex;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 9px;
}

.journey-bead {
  flex: 0 0 auto;
  border: 1px solid rgba(20, 24, 31, 0.12);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  box-shadow: inset 0 8px 14px rgba(255, 255, 255, 0.26), inset 0 -8px 15px rgba(20, 24, 31, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.journey-bead:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: inset 0 8px 14px rgba(255, 255, 255, 0.28), inset 0 -8px 15px rgba(20, 24, 31, 0.2), 0 8px 18px rgba(20, 24, 31, 0.12);
}

.journey-bead:focus-visible {
  outline: 3px solid rgba(76, 170, 181, 0.32);
  outline-offset: 2px;
}

.journey-bead span {
  transform: translateY(0.5px);
}

.journey-new { background: linear-gradient(145deg, #eef0ea, #bfc8c1); color: #48524b; }
.journey-learning { background: linear-gradient(145deg, #6fc0cb, #277f8c); }
.journey-review { background: linear-gradient(145deg, #dac27c, #9b762b); }
.journey-memorized { background: linear-gradient(145deg, #2d9b85, #0f6f5f); }

.contribution-scroll {
  overflow-x: auto;
  padding: 10px 0 4px;
}

.contribution-graph {
  --cell: 13px;
  --gap: 4px;
  min-width: max-content;
  display: grid;
  grid-template-columns: 28px repeat(26, var(--cell));
  grid-template-rows: 18px repeat(7, var(--cell));
  gap: var(--gap);
  align-items: center;
}

.month-label,
.day-label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.month-label {
  grid-row: 1;
  align-self: end;
}

.day-label {
  grid-column: 1;
  text-align: right;
  padding-right: 3px;
}

.contribution-cell {
  width: var(--cell);
  height: var(--cell);
  border: 1px solid rgba(20, 24, 21, 0.07);
  border-radius: 3px;
  background: #edf0ee;
}

.contribution-cell[data-level="1"] { background: #cfe2dc; }
.contribution-cell[data-level="2"] { background: #8fbfb3; }
.contribution-cell[data-level="3"] { background: #479280; }
.contribution-cell[data-level="4"] { background: #0f6f5f; }

.contribution-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}

.contribution-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(20, 24, 21, 0.07);
  background: #edf0ee;
}

.contribution-legend i[data-level="1"] { background: #cfe2dc; }
.contribution-legend i[data-level="2"] { background: #8fbfb3; }
.contribution-legend i[data-level="3"] { background: #479280; }
.contribution-legend i[data-level="4"] { background: #0f6f5f; }

@media (max-width: 640px) {
  .contribution-panel,
  .journey-panel { padding: 12px; }
  .contribution-graph { --cell: 12px; --gap: 3px; }
}

.contribution-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.contribution-controls select {
  width: auto;
  min-width: 112px;
  min-height: 34px;
  padding: 6px 8px;
}

.contribution-cell {
  min-height: var(--cell);
  padding: 0;
  display: block;
}

.contribution-cell:hover {
  border-color: rgba(20, 24, 21, 0.2);
  filter: brightness(0.96);
}

@media (max-width: 640px) {
  .contribution-panel .section-head,
  .contribution-controls {
    align-items: start;
    justify-content: flex-start;
  }
}
