/* РеФорма mini-app — calm pastel palette, generous spacing, rounded everything */
:root {
  --bg: #f6f3ef;
  --card: #ffffff;
  --ink: #2c2723;
  --muted: #8b837b;
  --accent: #b89a7d;
  --accent-soft: #efe5d8;
  --ok: #5c8d65;
  --warn: #c47a4a;
  --shadow: 0 1px 2px rgba(44,39,35,.04), 0 8px 24px rgba(44,39,35,.06);
  --r: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; }
body { padding-bottom: 88px; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
.muted { color: var(--muted); }

/* Header */
.hdr { padding: 0; margin: 0 0 8px; }
.hero {
  position: relative;
  padding: 18px 16px 16px;
  overflow: hidden;
  border-radius: 0 0 22px 22px;
  background:
    radial-gradient(120% 80% at 30% 0%, #f6ebd8 0%, transparent 60%),
    radial-gradient(100% 80% at 90% 100%, #ecd9bd 0%, transparent 70%),
    linear-gradient(180deg, #f4e7d2 0%, #ecdcc4 100%);
  box-shadow: 0 4px 14px rgba(184,154,125,.16);
  text-align: center;
}
.hero-logo {
  display: block;
  margin: 0 auto;
  width: 105px; height: 105px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 14px rgba(184,154,125,.25), 0 1px 0 rgba(255,255,255,.6) inset;
  object-fit: cover;
}
.hero-tag {
  margin-top: 10px;
  font-size: 11px; font-weight: 500;
  color: #8a6a4c; letter-spacing: 1.4px; text-transform: uppercase;
}

/* Screens */
.screen { display: none; padding: 8px 16px 20px; animation: fade .2s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Home */
.hello { font-size: 26px; font-weight: 600; margin: 8px 4px 18px; }
.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tile {
  background: var(--card); border: 0; border-radius: var(--r);
  padding: 18px; text-align: left; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto;
  column-gap: 14px; align-items: center;
}
.tile:active { transform: scale(.985); }
.tile .ico { grid-row: 1/3; font-size: 32px; }
.tile .label { font-size: 17px; font-weight: 600; }
.tile .hint { font-size: 13px; color: var(--muted); }

.footer-note { color: var(--muted); font-size: 13px; padding: 16px 4px; text-align: center; }

/* Schedule */
.day-tabs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 0 12px; margin: 0 -4px;
  scrollbar-width: none;
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  flex: 0 0 auto; padding: 10px 14px; border-radius: 14px;
  background: var(--card); border: 0; font: inherit; color: var(--ink);
  display: grid; place-items: center; min-width: 64px;
  box-shadow: var(--shadow);
}
.day-tab.active { background: var(--ink); color: white; }
.day-tab .dnum { font-size: 18px; font-weight: 600; }
.day-tab .dwk { font-size: 11px; opacity: .7; text-transform: lowercase; }

.list { display: grid; gap: 10px; }
.lesson {
  background: var(--card); border-radius: var(--r); padding: 14px 16px;
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
}
.lesson .time { font-weight: 600; font-size: 16px; }
.lesson .meta { font-size: 13px; color: var(--muted); }
.lesson .name { font-weight: 500; }
.lesson button {
  background: var(--accent-soft); border: 0; padding: 8px 14px;
  border-radius: 12px; font: inherit; color: var(--accent); font-weight: 500;
}
.lesson.full button { background: #f1eee9; color: var(--muted); }
.lesson.booked button { background: var(--ok); color: white; }

/* Card */
.card-block {
  background: var(--card); border-radius: var(--r); padding: 22px;
  box-shadow: var(--shadow); margin-top: 8px;
}
.big-num { font-size: 64px; font-weight: 700; line-height: 1; color: var(--accent); }
.big-cap { color: var(--muted); margin-top: 4px; font-size: 14px; }

/* Contacts */
.contacts .row { display: flex; gap: 14px; padding: 14px 16px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; }
.contacts .row span:first-child { font-size: 22px; }

/* Buttons */
.btn { display: block; width: 100%; padding: 14px; border-radius: 14px; border: 0; font: inherit; font-size: 16px; font-weight: 500; margin-top: 12px; }
.btn.primary { background: var(--ink); color: white; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:active { transform: scale(.99); }

/* Link form */
input[type=tel] {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 17px;
  border: 1px solid #e5dfd7; border-radius: 14px; background: var(--card);
  margin-top: 14px; -webkit-appearance: none;
}
input[type=tel]:focus { outline: 2px solid var(--accent); border-color: transparent; }
.status { padding: 12px 0; font-size: 14px; min-height: 20px; }
.status.ok { color: var(--ok); }
.status.err { color: var(--warn); }

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  display: flex; justify-content: space-around; padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid #ece7df;
}
.nb { background: transparent; border: 0; font-size: 22px; padding: 10px 18px; border-radius: 14px; opacity: .5; }
.nb.active { opacity: 1; background: var(--accent-soft); }

/* Empty / loading */
.empty { padding: 28px; text-align: center; color: var(--muted); }
.skel {
  background: linear-gradient(90deg, #efeae2 0%, #f6f2ec 50%, #efeae2 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 12px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
