:root {
  color-scheme: dark;
  --bg: #100e19;
  --surface: #1d192b;
  --line: #ffffff19;
  --text: #f7f4fd;
  --muted: #b8aecb;
  --dim: #9388a8;
  --lime: #d5fa79;
  --purple: #c4aafa;
  --amber: #ffb77d;
  --glass: linear-gradient(145deg,#ffffff12,#ffffff06 55%,#ffffff08);
  --shadow: 0 22px 55px #0905124a, inset 0 1px 0 #ffffff13;
  --radius: 24px;
  font-family: 'IBM Plex Sans Arabic',Tahoma,Arial,sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; min-height: 100svh; color: var(--text); background:
    radial-gradient(ellipse at 100% 0%,#4c2b7350,transparent 46%),
    radial-gradient(ellipse at 0% 55%,#2e214957,transparent 52%),var(--bg);
  background-attachment: fixed;
}
::selection { background: var(--lime); color: #171222; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
img { display: block; max-width: 100%; }
svg { display: block; flex: 0 0 auto; }
p, h1, h2, h3 { margin: 0; }
p { line-height: 1.62; }
h1, h2, h3 { line-height: 1.22; }
h1 { font-size: clamp(2.4rem,5vw,3.65rem); letter-spacing: -.05em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
small { font-size: .83rem; }
b, strong { font-weight: 700; }
em { font-style: normal; color: var(--lime); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; inset: 10px auto auto 10px; padding: 10px 15px; color: #111; background: var(--lime); border-radius: 10px; transform: translateY(-160%); z-index: 10; }
.skip-link:focus { transform: none; }
.number { font-family: 'Space Grotesk','IBM Plex Sans Arabic',sans-serif; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.handle { direction: ltr; unicode-bidi: isolate; display: inline-block; font-family: 'Space Grotesk',sans-serif; color: var(--muted); font-size: .84rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--purple); font-family: 'Space Grotesk','IBM Plex Sans Arabic',sans-serif; font-size: .68rem; letter-spacing: .16em; font-weight: 700; line-height: 1.4; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .86rem; line-height: 1.65; }
.hint a, .callout a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.accent { color: var(--lime); }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 15px; align-content: start; min-width: 0; }
.stack > .btn { justify-self: start; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.glass { background: var(--glass),#211a3085; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); backdrop-filter: blur(17px); }
.panel { padding: 23px; min-width: 0; }
.panel > h2:first-child { margin-bottom: 12px; }
.stack > h2:first-child { margin-bottom: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.section-head h2 { margin-top: 3px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 10px 0 4px; }
.page-heading h1 { margin: 4px 0 8px; }
.page-heading p { color: var(--muted); }
.standalone-title { margin-top: 10px; }
.btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  border: 1px solid #ffffff1d; background: #ffffff0b; color: var(--text); border-radius: 13px;
  min-height: 43px; padding: 8px 14px; font-weight: 600; line-height: 1.25; transition: background .16s,border-color .16s,transform .16s;
}
.btn:hover, .icon-btn:hover { background: #ffffff16; border-color: #ffffff3a; }
.btn:active, .icon-btn:active { transform: scale(.98); }
.btn.primary { color: #1b230e; background: linear-gradient(135deg,#e6ffa7,var(--lime) 65%,#b2e454); border-color: #e8ffa1; box-shadow: 0 7px 20px #baf65822,inset 0 1px 0 #f3ffd4; font-weight: 700; }
.btn.primary:hover { background: #e3ff9d; }
.btn.selected { color: var(--lime); border-color: #d5fa7957; background: #d5fa7910; }
.btn.subtle, .text-btn { background: transparent; }
.btn.danger { color: #ffb4c5; background: #ff729011; border-color: #ff729030; }
.text-btn { font-weight: 600; color: var(--text); border: 0; padding: 6px 0; text-align: start; }
.text-btn:hover { color: var(--lime); }
.icon-btn { width: 42px; height: 42px; padding: 0; flex: 0 0 auto; }
.tile { display: inline-grid; place-items: center; width: 43px; height: 43px; border: 1px solid #ffffff21; border-radius: 14px; flex: 0 0 auto; color: var(--purple); background: #ae86e823; }
.tile.lime { color: var(--lime); background: #d5fa7914; border-color: #d5fa792b; }
.tile.purple { color: var(--purple); background: #bc95ff19; border-color: #bc95ff2e; }
.tile.amber { color: var(--amber); background: #ffb77d19; border-color: #ffb77d2e; }
.tag { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: .79rem; font-weight: 600; background: #c4aafa13; border: 1px solid #c4aafa23; color: #e3d4ff; }
.tags, .tabs { display: flex; align-items: center; gap: 7px; }
.tabs.wrap, .tags { flex-wrap: wrap; }
.tabs .btn { min-height: 36px; padding: 6px 11px; font-size: .87rem; }
.callout { display: block; border-radius: 13px; padding: 11px 13px; background: #bb94f81a; border: 1px solid #bb94f82c; color: #ebdfff; line-height: 1.55; }
.callout small { display: block; color: var(--muted); margin-top: 4px; }
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
.empty { min-height: 160px; display: grid; justify-items: center; align-content: center; text-align: center; gap: 9px; padding: 23px 12px; }
.empty p { color: var(--muted); }
.empty .btn { margin-top: 6px; }
.list { min-width: 0; }
.list-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #ffffff11; min-height: 54px; padding: 8px 0; min-width: 0; }
.list-row:last-child { border-bottom: 0; }
.list-row small, .person small { display: block; color: var(--muted); }
.list-row p, .list-row b { overflow-wrap: anywhere; }
.list-link { border-radius: 10px; transition: color .15s; }
.list-link:hover { color: var(--lime); }
.count-badge { display: grid; place-items: center; min-width: 29px; height: 29px; background: #ffffff0d; color: var(--muted); border-radius: 8px; }
.count-badge.first { background: #d5fa7920; color: var(--lime); }
.avatar { display: inline-grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: linear-gradient(145deg,#67459a,#33234b); border: 1px solid #ffffff32; color: #f4e8ff; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.large { width: 82px; height: 82px; font-size: 2rem; }
.person { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.person > span:last-child { min-width: 0; }
.person b { display: block; overflow-wrap: anywhere; }
.live-dot, .live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px #caff7ba5; display: inline-block; flex: 0 0 auto; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; color: var(--lime); background: #d5fa7912; border: 1px solid #d5fa7927; border-radius: 99px; white-space: nowrap; font-size: .79rem; }
.progress { background: #0b081b66; height: 8px; overflow: hidden; border-radius: 12px; width: 100%; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg,#a6cf56,#ddff9d); border-radius: inherit; transition: width .25s; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; font-size: .9rem; font-weight: 600; }
input, select, textarea {
  width: 100%; min-width: 0; color: var(--text); background: #0d0a1799; border: 1px solid #f5e9ff27;
  border-radius: 12px; padding: 9px 11px; min-height: 42px; line-height: 1.35;
}
input::placeholder, textarea::placeholder { color: #a394bb; }
input:focus, select:focus, textarea:focus { border-color: #d5fa7985; outline-offset: 1px; outline-width: 1px; }
input[type="file"] { padding: 7px; font-size: .82rem; }
input::file-selector-button { color: var(--text); border: 1px solid #ffffff22; border-radius: 7px; background: #ffffff11; margin-inline-end: 8px; padding: 4px 8px; }
textarea { resize: vertical; min-height: 84px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.form-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.inline-form { display: flex; align-items: end; gap: 10px; }
.inline-form .field { flex: 1; }
.week-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.week-picker label { cursor: pointer; }
.week-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.week-picker span { display: block; border: 1px solid #ffffff18; border-radius: 10px; padding: 6px 9px; color: var(--muted); font-size: .82rem; }
.week-picker input:checked + span { color: var(--lime); background: #d5fa7912; border-color: #d5fa794a; }
.week-picker input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }

.brand { display: inline-flex; width: fit-content; align-items: center; gap: 9px; font-family: 'Space Grotesk',sans-serif; font-size: 1.4rem; font-weight: 700; letter-spacing: -.055em; }
.brand > span > span { color: var(--lime); }
.brand img { flex: 0 0 auto; }
.layout { display: grid; grid-template-columns: 218px minmax(0,1fr); gap: 22px; max-width: 1440px; margin: 0 auto; padding: 18px 24px 118px; }
.sidebar { position: sticky; top: 18px; height: min(685px,calc(100svh - 37px)); padding: 20px 14px; display: flex; flex-direction: column; gap: 21px; overflow-y: auto; }
.sidebar > .brand { margin-inline: 5px; }
.sidebar-links { flex: 1; }
.sidebar-links nav { display: grid; gap: 4px; margin-top: 8px; }
.side-label { margin-top: 14px; }
.sidebar .eyebrow { padding-inline: 10px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: .92rem; border: 1px solid transparent; }
.nav-link:hover { color: var(--text); background: #ffffff0b; }
.nav-link.current { color: var(--lime); background: #d5fa7912; border-color: #d5fa7928; }
.sidebar-user { border-top: 1px solid var(--line); padding: 13px 2px 0; }
.content-shell { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 49px; margin-bottom: 13px; }
.topbar > .brand { visibility: hidden; }
.top-right { display: flex; align-items: center; gap: 10px; }
.top-date { font-size: .87rem; color: var(--muted); }
.top-avatar { display: inline-flex; }
.notification { position: relative; }
.notification > span { position: absolute; inset: -4px -4px auto auto; color: #171222; background: var(--lime); font: 700 .68rem 'Space Grotesk',sans-serif; min-width: 16px; border-radius: 9px; padding: 2px 4px; }
.content { display: grid; gap: 16px; align-content: start; min-width: 0; }
.bottom-nav { position: fixed; z-index: 5; bottom: max(13px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; width: min(510px,calc(100% - 22px)); padding: 7px; background: linear-gradient(140deg,#3e345bdf,#1b152be8); border-radius: 22px; backdrop-filter: blur(28px); }
.bottom-nav .nav-link { justify-content: center; flex-direction: column; gap: 3px; min-height: 50px; font-size: .75rem; padding: 4px 1px; }
.bottom-nav .nav-link.current svg { filter: drop-shadow(0 0 8px #c4f67a66); }
.public-shell, .setup-shell { max-width: 920px; margin: auto; padding: 20px 20px 70px; }
.setup-shell { max-width: 640px; }
.setup-shell .auth-top, .public-shell .auth-top { margin-bottom: 18px; }
.setup-shell .page-heading { padding: 0; }

.hero, .auth-cover { position: relative; isolation: isolate; overflow: hidden; }
.hero {
  min-height: 295px; display: flex; align-items: center; padding: 30px;
  background: radial-gradient(ellipse at 19% 57%,#7656a971,transparent 60%),
    linear-gradient(135deg,#38284fae,#1b1629 72%); border-color: #c4aafa2e;
}
.hero-copy { position: relative; z-index: 2; width: 59%; }
.hero-copy h1 { overflow-wrap: anywhere; }
.hero h1, .auth-cover h1 { font-size: clamp(3.25rem,7vw,5.5rem); letter-spacing: -.075em; margin: 5px 0 8px; line-height: .99; font-weight: 700; }
.hero-copy p, .auth-cover > p { color: #ded0ee; margin: 12px 0 18px; max-width: 33ch; }
.hero-art {
  position: absolute; inset: 0 auto 0 0; width: 51%; pointer-events: none; overflow: hidden;
  background-image: linear-gradient(#e0b8ff11 1px,transparent 1px),linear-gradient(90deg,#e0b8ff11 1px,transparent 1px);
  background-size: 24px 24px; mask-image: linear-gradient(90deg,#000 76%,transparent);
}
.art-disc, .orbit, .spark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.art-disc { width: clamp(125px,18vw,225px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; transform: rotate(-6deg);
  background: radial-gradient(ellipse at 40% 21%,#c0a1f53a,#50397136 58%,#221530ad); border: 1px solid #d6b8ff72;
  box-shadow: inset 0 3px 14px #e1c9fa35,inset 0 -14px 25px #140b2a90,0 0 70px #cc9dff2e,0 20px 55px #1109207e; }
.art-disc svg { width: 88%; filter: drop-shadow(0 12px 14px #120d1b92); }
.orbit { border-radius: 50%; border: 1px solid #dabfff39; width: min(78%,290px); aspect-ratio: 1; }
.orbit-b { width: min(93%,355px); border-color: #dabfff22; }
.orbit-c { width: min(100%,420px); border-color: #dabfff25; transform: rotate(37deg) scaleY(.58); }
.spark { width: 8px; height: 8px; border-radius: 2px; rotate: 45deg; box-shadow: 0 0 19px #d4f895a1; background: #e4ffae; }
.spark-a { left: 24%; top: 34%; }
.spark-b { left: 75%; top: 68%; width: 5px; height: 5px; background: #eadbff; box-shadow: 0 0 16px #dbaaffb9; }
.art-label, .art-index { position: absolute; font: 600 .6rem 'Space Grotesk',sans-serif; color: #e4d0ffab; letter-spacing: .16em; }
.art-label { left: 18px; bottom: 18px; }
.art-index { left: 18px; top: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.stat { position: relative; display: grid; gap: 5px; align-content: start; padding: 16px; min-width: 0; }
.stat .tile { margin-bottom: 4px; width: 38px; height: 38px; }
.stat > strong { display: block; font-size: clamp(1.55rem,4vw,2.45rem); line-height: 1.07; }
.stat > small, .stat strong small { color: var(--muted); font: 500 .85rem 'IBM Plex Sans Arabic',sans-serif; }
.stat .progress { margin-top: 6px; }
a.stat:hover { border-color: #d5fa7957; }
.dashboard-split { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); }
.week-strip { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; }
.week-strip > div { display: grid; justify-items: center; gap: 4px; border: 1px solid #ffffff12; background: #ffffff05; border-radius: 12px; padding: 7px 0; color: var(--muted); }
.week-strip .today { color: var(--lime); border-color: #d5fa794d; background: #d5fa790e; }
.week-strip .done span { color: var(--lime); }
.week-strip b { font-family: 'Space Grotesk',sans-serif; }
.reminder { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; padding: 10px 14px; color: var(--amber); }

.auth-shell { max-width: 1190px; margin: auto; padding: 23px 24px 45px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.auth-layout { display: grid; grid-template-columns: minmax(0,1.32fr) minmax(310px,.92fr); gap: 20px; margin-top: 24px; align-items: stretch; }
.auth-cover {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  padding: 35px 35px 22px; min-height: 530px; border-radius: 30px; border: 1px solid #cbb5ee40;
  background: radial-gradient(ellipse at 22% 71%,#7754aa92,transparent 64%),linear-gradient(145deg,#413052,#251a36 60%,#1c1529);
  box-shadow: var(--shadow);
}
.auth-cover h1 { font-size: clamp(4rem,8vw,7.1rem); position: relative; z-index: 2; }
.auth-cover p { position: relative; z-index: 2; }
.auth-art .hero-art { width: 76%; height: 78%; inset: auto auto 0 0; }
.auth-art .art-disc { width: clamp(140px,22vw,260px); }
.auth-art .art-disc, .auth-art .orbit { top: 57%; }
.auth-art .art-label { display: none; }
.cover-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; z-index: 2; }
.cover-pills > span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: #211932a8; border: 1px solid #c6a8f251; color: #eee4fb; font-size: .82rem; backdrop-filter: blur(12px); }
.cover-pills svg { color: var(--lime); }
.auth-card { display: grid; align-content: center; gap: 12px; padding: clamp(20px,4vw,42px); }
.auth-card h2 { font-size: clamp(1.85rem,4vw,2.55rem); }
.auth-tabs { padding-bottom: 10px; }
.auth-tabs .btn { flex: 1; }
.auth-card form { margin-top: 5px; }
.auth-card form .primary { min-height: 48px; }
.auth-foot { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 13px; margin-top: 5px; color: var(--dim); font-size: .78rem; }
.auth-foot > :first-child { font-family: 'Space Grotesk',sans-serif; letter-spacing: .12em; }
.boot { min-height: 100svh; display: grid; justify-items: center; align-content: center; gap: 10px; color: var(--muted); }

.plan-row { display: grid; grid-template-columns: minmax(90px,1fr) 62px 62px 34px; align-items: end; gap: 6px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.plan-row label { font-size: .75rem; color: var(--muted); }
.plan-row input { min-height: 35px; padding: 5px 7px; }
.plan-row .icon-btn { width: 34px; height: 35px; }
.filters { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.input-icon { display: flex; align-items: center; position: relative; color: var(--purple); }
.input-icon svg { position: absolute; inset-inline-start: 9px; }
.input-icon input { padding-inline-start: 34px; }
.exercise-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-top: 8px; }
.exercise-card { text-align: start; overflow: hidden; padding: 0; color: var(--text); min-width: 0; }
.exercise-card:hover { border-color: #c4aafa70; }
.exercise-photo { aspect-ratio: 1.5; display: grid; place-items: center; background: #eee9ef; color: #4a3b5b; }
.exercise-photo img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.exercise-card-body { padding: 9px 11px 13px; display: grid; gap: 5px; }
.exercise-card-body .tag { justify-self: start; font-size: .7rem; }
.exercise-card-body small { color: var(--muted); }
.exercise-images { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.exercise-images img { width: 100%; aspect-ratio: 1.45; object-fit: contain; border-radius: 10px; background: #f4eff4; }
.instructions { margin: 0; padding-inline-start: 22px; color: #e5daee; font: .9rem/1.65 'Space Grotesk',sans-serif; }
.instructions[lang="ar"] { font-family: 'IBM Plex Sans Arabic',Tahoma,sans-serif; }
.instructions li { margin-bottom: 5px; }
.picker-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; max-height: 52svh; overflow-y: auto; padding: 3px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 3px; }
.training-start { min-height: 260px; display: grid; align-content: center; justify-items: start; gap: 13px; }
.live-banner { padding: 13px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: linear-gradient(130deg,#252231,#35452879); }
.timer { font-size: clamp(1.7rem,5vw,2.7rem); color: var(--lime); direction: ltr; }
.finish-score { display: flex; align-items: center; gap: 10px; }
.finish-score strong { font-size: 2.8rem; color: var(--lime); }
.month-input { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .79rem; }
.month-input input { width: min(140px,32vw); font-size: .8rem; direction: ltr; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; margin-top: 13px; }
.day-name { color: var(--muted); text-align: center; font-size: .81rem; }
.calendar-day { background: #ffffff0a; color: var(--text); border: 1px solid var(--line); border-radius: 9px; min-height: 40px; }
.calendar-day.trained { color: var(--lime); background: #d5fa791c; }
.calendar-day.selected { border-color: var(--lime); }
.session { border-bottom: 1px solid var(--line); }
.session:last-child { border-bottom: 0; }
.session summary { padding: 13px 0; cursor: pointer; }
.session summary > span { display: inline-flex; align-items: center; gap: 4px; padding-inline-end: 8px; }
.session summary > span:last-child { color: var(--muted); font-size: .83rem; }
.milestones { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.milestones span { display: grid; border-radius: 10px; padding: 7px; text-align: center; background: #ffffff07; color: var(--muted); }
.milestones .achieved { color: var(--lime); background: #d5fa7915; }
.ranking-row { padding-inline: 8px; }
.ranking-row.mine { background: #d5fa7909; border-radius: 10px; }
.profile-info { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.profile-info > div { flex: 1; }
.profile-info h2 { font-size: 1.8rem; }
.profile-info .live-pill { margin-inline-start: 7px; }
.profile-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 18px; }
.profile-metrics > div { background: #ffffff07; border: 1px solid var(--line); padding: 8px 10px; border-radius: 11px; }
.profile-metrics small { display: block; color: var(--muted); }
.profile-metrics b { font-size: 1.35rem; }
.profile-metrics span { color: var(--muted); font-size: .8rem; }
.post-list { display: grid; gap: 13px; }
.post { padding: 16px; display: grid; gap: 12px; }
.post-copy { white-space: pre-wrap; overflow-wrap: anywhere; text-align: start; }
.post-photo { width: 100%; max-height: 540px; object-fit: contain; border-radius: 14px; background: #0e0a17; }
.post footer { border-top: 1px solid var(--line); padding-top: 9px; }
.post .liked { color: #ffc2d2; }
.post .liked svg { fill: #ff8fa76b; }
.composer { display: flex; gap: 9px; align-items: start; }
.composer-controls { align-items: end; }
.composer-controls .field { flex: 1; }
.composer-controls .field:nth-child(2) { flex: 1.4; }

dialog {
  border: 1px solid #e3ccff46; border-radius: 24px; color: var(--text); padding: 0;
  width: min(640px,calc(100% - 24px)); max-height: min(86svh,850px); background: linear-gradient(150deg,#342947,#211a32);
  box-shadow: 0 25px 100px #080511b5,inset 0 1px 0 #ffffff1f; overflow: auto;
}
dialog::backdrop { background: #090512a6; backdrop-filter: blur(6px); }
.modal-inner { display: grid; gap: 13px; padding: clamp(16px,4vw,25px); }
.rule-list { margin: 0; padding-inline-start: 20px; }
.rule-list li { margin-bottom: 8px; }
#toast { position: fixed; z-index: 20; left: 50%; top: 15px; translate: -50% -160%; opacity: 0; transition: translate .2s,opacity .2s; max-width: calc(100% - 26px); width: max-content; border-radius: 14px; padding: 10px 15px; color: #f0ffd4; background: #26341b; border: 1px solid #d5fa7955; box-shadow: var(--shadow); pointer-events: none; }
#toast.visible { translate: -50% 0; opacity: 1; }
#toast.error, .dialog-feedback.error { color: #ffd7e1; background: #452536; border: 1px solid #ff9bb945; }
.dialog-feedback { border-radius: 10px; padding: 8px 11px; }

@media (max-width: 1050px) {
  .layout { grid-template-columns: 175px minmax(0,1fr); padding-inline: 15px; gap: 15px; }
  .sidebar { padding-inline: 11px; }
  .panel { padding: 17px; }
  .exercise-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 790px) {
  .layout { display: block; padding: 12px 13px 100px; }
  .sidebar { display: none; }
  .topbar { margin-bottom: 9px; }
  .topbar > .brand { visibility: visible; }
  .hero { padding: 24px; min-height: 270px; }
  .auth-shell { padding: 15px 14px 35px; }
  .auth-layout { gap: 12px; margin-top: 15px; }
  .auth-cover { padding: 24px 18px 17px; min-height: 445px; }
  .auth-cover h1 { font-size: clamp(3.6rem,9vw,5.3rem); }
}
@media (max-width: 600px) {
  .split, .dashboard-split, .auth-layout { grid-template-columns: minmax(0,1fr); }
  .auth-cover { min-height: 278px; }
  .auth-cover > p { max-width: 27ch; }
  .auth-art .hero-art { width: 47%; height: 100%; }
  .auth-art .art-disc { width: clamp(73px,24vw,135px); top: 41%; left: 42%; }
  .auth-art .orbit { top: 41%; left: 42%; }
  .cover-pills { gap: 5px; }
  .cover-pills > span { font-size: .73rem; padding-inline: 7px; }
  .cover-pills svg { width: 14px; height: 14px; }
  .auth-art .art-index, .hero-art .art-index { display: none; }
  .auth-card { padding: 19px; }
  .panel { padding: 14px; }
  .hero { padding: 17px; min-height: 248px; }
  .hero-copy { width: 65%; }
  .hero h1 { font-size: clamp(2.9rem,10vw,4.15rem); }
  .hero-art { width: 50%; }
  .hero-art .art-disc { width: clamp(98px,30vw,150px); }
  .hero-copy p { margin: 8px 0 13px; font-size: .9rem; }
  .hero .btn { min-height: 37px; padding: 6px 9px; font-size: .83rem; }
  .top-date { display: none; }
  .stat-grid { gap: 6px; }
  .stat { padding: 9px; border-radius: 15px; font-size: .8rem; }
  .stat .tile { width: 29px; height: 29px; border-radius: 10px; }
  .stat .tile svg { width: 16px; }
  .stat > small, .stat strong small { font-size: .7rem; }
  .page-heading { align-items: start; flex-wrap: wrap; }
  .page-heading h1 { font-size: 2.25rem; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .search-field { grid-column: span 2; }
  .exercise-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .exercise-card { border-radius: 13px; }
  .profile-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .composer-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .composer-controls .btn { grid-column: span 2; }
  .form-grid { gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
