:root {
  --bg: #f4f7f8;
  --surface: #fff;
  --text: #14212b;
  --muted: #6b7a86;
  --line: #dfe7eb;
  --primary: #0f766e;
  --primary-soft: #e4f4f1;
  --shadow: 0 12px 34px rgba(31, 50, 66, .09);
}

[data-theme="dark"] {
  --bg: #0b1419;
  --surface: #132129;
  --text: #f3f7f8;
  --muted: #9eacb5;
  --line: #263841;
  --primary: #2dd4bf;
  --primary-soft: #153834;
  --shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: background .2s, color .2s;
}

a { text-decoration: none; color: inherit; }
button, input { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 28px, 980px);
  margin: 14px auto 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 11px; }

.brand-mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, #22c55e);
  color: #fff; font-weight: 900; font-size: 1.1rem;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; }
.brand small { margin-top: 2px; color: var(--muted); font-size: .78rem; }

.theme-toggle {
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.2rem;
  display: grid; place-items: center;
  transition: border-color .2s;
}
.theme-toggle:hover { border-color: var(--primary); }

.play-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 6px;
  border-radius: 10px;
  background: #16a34a;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: opacity .2s;
}
.play-btn:hover { opacity: .9; }
.play-btn img { border-radius: 8px; }

.page { width: min(100% - 28px, 980px); margin: 22px auto 40px; }

.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.label {
  display: inline-block;
  color: var(--primary);
  font-weight: 900;
  font-size: .72rem;
  letter-spacing: .13em;
}

.intro h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -.05em;
}

.intro p { margin-top: 8px; color: var(--muted); line-height: 1.6; }

.search-box {
  width: min(100%, 340px);
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--bg);
}
.search-box input {
  width: 100%;
  border: 0; outline: 0;
  background: transparent;
  color: var(--text);
}
.search-box span { opacity: .6; }

.services {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-heading h2 { font-size: 1.4rem; }
.section-heading span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 800;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.service-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(15, 118, 110, .11);
}

.service-button { width: 100%; color: inherit; }

.icon {
  width: 55px; height: 55px;
  display: grid; place-items: center;
  border-radius: 16px;
  font-size: 1.55rem;
}

.green { background: #e6f8ef; }
.purple { background: #f2eafe; }
.orange { background: #fff1df; }
.blue { background: #e6f1ff; }
.red { background: #ffe8e8; }
.teal { background: #e3f7f4; }
.dark { background: #e8edf0; }

[data-theme="dark"] .green { background: #1a3a2e; }
[data-theme="dark"] .purple { background: #2d1f3d; }
[data-theme="dark"] .orange { background: #3d2e1a; }
[data-theme="dark"] .blue { background: #1a2a3d; }
[data-theme="dark"] .red { background: #3d1f1f; }
[data-theme="dark"] .teal { background: #1a3a3a; }
[data-theme="dark"] .dark { background: #2a2f33; }

.content strong, .content small { display: block; }
.content strong { font-size: 1rem; }
.content small { margin-top: 5px; color: var(--muted); line-height: 1.4; }

.arrow { font-size: 1.8rem; color: var(--primary); }

.empty-state { display: none; padding: 26px; text-align: center; color: var(--muted); }
.empty-state.show { display: block; }
.empty-state strong, .empty-state small { display: block; }
.empty-state small { margin-top: 5px; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 4px;
  color: var(--muted);
  font-size: .85rem;
}
footer strong { color: var(--text); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal.show { opacity: 1; pointer-events: auto; }

.modal-card {
  position: relative;
  width: min(460px, 100%);
  padding: 26px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.modal-card h2 { margin-top: 8px; }
.modal-card p { margin: 12px 0 20px; color: var(--muted); line-height: 1.7; }

.modal-close {
  position: absolute;
  right: 14px; top: 14px;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  display: grid; place-items: center;
}

.done-btn {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 13px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 18px);
  padding: 10px 15px;
  border-radius: 999px;
  background: #17212b;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  font-size: .9rem;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .intro { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; max-width: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .page, .topbar { width: min(100% - 18px, 980px); }
  .intro, .services { padding: 18px; border-radius: 20px; }
  footer { flex-direction: column; }
}

@media (max-width: 420px) {
  .service-card { grid-template-columns: auto 1fr; padding: 13px; }
  .arrow { display: none; }
  .icon { width: 49px; height: 49px; border-radius: 14px; }
  .play-btn span { display: none; }
  .play-btn { padding: 6px; }
}