*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#101828;background:linear-gradient(145deg,#e9fbff 0%,#f7f2ff 58%,#fff 100%)}body{overflow-x:hidden}.app-shell{max-width:480px;min-height:100vh;margin:0 auto;background:linear-gradient(180deg,#f8fdff,#f7f4ff);position:relative;padding-bottom:92px;box-shadow:0 0 0 1px rgba(125,86,207,.08)}.app-top{position:fixed;top:0;left:50%;transform:translateX(-50%);z-index:200;width:min(480px,100%);background:rgba(255,255,255,.94);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #e6dcff;box-shadow:0 8px 26px rgba(39,54,91,.08)}.app-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:#142238}.app-brand b{display:block;font-size:16px}.app-brand small{display:block;font-size:12px;color:#667085}.app-logo{width:42px;height:42px;border-radius:16px;background:linear-gradient(135deg,#7c4dff,#24c6c8);color:white;display:grid;place-items:center;font-weight:900;box-shadow:0 14px 30px rgba(124,77,255,.22)}.top-chip{padding:10px 13px;border-radius:999px;background:#f0e9ff;color:#6d42e8;text-decoration:none;font-weight:800;font-size:13px}.app-main{padding:92px 16px 18px}.hero-app{border-radius:32px;padding:24px;background:linear-gradient(135deg,#fff,#e7fbff 55%,#efe7ff);border:1px solid #dde4ff;box-shadow:0 20px 45px rgba(85,67,166,.12);overflow:hidden}.kicker{display:inline-flex;padding:8px 12px;border-radius:999px;background:#ede9fe;color:#6b3eea;font-weight:900;font-size:12px}.hero-app h1{font-size:38px;line-height:1.02;margin:16px 0 12px;color:#102033;letter-spacing:-.04em}.hero-app p{font-size:16px;line-height:1.5;color:#5b6678;margin:0 0 18px}.actions{display:grid;gap:10px}.btn{border:0;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 18px;border-radius:16px;background:linear-gradient(135deg,#7357f6,#25c5c7);color:white;font-weight:900;box-shadow:0 14px 30px rgba(72,88,220,.22);cursor:pointer}.btn.secondary{background:#fff;color:#6d42e8;border:1px solid #e2d8ff;box-shadow:none}.card{background:rgba(255,255,255,.92);border:1px solid #e6ddff;border-radius:24px;padding:18px;box-shadow:0 14px 35px rgba(77,91,130,.09);margin:14px 0}.card h2,.card h3{margin:0 0 8px}.muted{color:#667085;line-height:1.45}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.quick{background:white;border:1px solid #e6ddff;border-radius:22px;padding:16px;text-decoration:none;color:#172033;min-height:112px}.quick span{font-size:27px}.quick b{display:block;margin-top:8px}.test-list{display:grid;gap:14px}.test-card{padding:18px;border-radius:24px;background:white;border:1px solid #e4dcff;display:grid;grid-template-columns:54px 1fr;gap:13px;align-items:start;text-decoration:none;color:#172033;box-shadow:0 14px 34px rgba(91,74,140,.08)}.test-icon{width:54px;height:54px;border-radius:18px;background:linear-gradient(135deg,#32d0c7,#7c4dff);display:grid;place-items:center;color:white;font-size:25px;font-weight:900}.test-card h3{margin:0 0 6px;font-size:19px}.test-card p{margin:0;color:#667085;line-height:1.35}.test-card small{display:inline-flex;margin-top:10px;color:#6d42e8;font-weight:900}.question-card{background:white;border:1px solid #e4dcff;border-radius:26px;padding:22px;margin-top:12px;box-shadow:0 18px 40px rgba(91,74,140,.09)}.question-card h2{font-size:22px;line-height:1.2;margin:0 0 16px}.option{display:flex;align-items:center;gap:10px;border:1px solid #dde3f0;border-radius:16px;padding:14px;margin:10px 0;background:#fbfdff;font-weight:700}.option input{width:18px;height:18px}.progress{height:10px;border-radius:999px;background:#e8eef5;overflow:hidden;margin:8px 0 18px}.progress span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#26c6c8,#7c4dff)}.result-ring{width:150px;height:150px;border-radius:50%;margin:8px auto 18px;display:grid;place-items:center;background:conic-gradient(#7457f6 var(--p),#e9edf5 0);position:relative}.result-ring:after{content:"";position:absolute;inset:14px;border-radius:50%;background:white}.result-ring b{position:relative;z-index:2;font-size:34px}.qr{display:grid;place-items:center;text-align:center}.qr img{width:210px;max-width:100%;border-radius:18px;background:white;border:1px solid #e2e8f0;padding:12px}.bottom-nav{position:fixed;left:50%;bottom:12px;transform:translateX(-50%);z-index:30;width:min(448px,calc(100% - 24px));display:grid;grid-template-columns:repeat(4,1fr);gap:6px;background:rgba(17,24,39,.92);backdrop-filter:blur(16px);border-radius:24px;padding:8px;box-shadow:0 20px 40px rgba(15,23,42,.28)}.bottom-nav a{text-decoration:none;color:#dbeafe;text-align:center;border-radius:17px;padding:8px 4px;font-weight:700}.bottom-nav span{display:block;font-size:20px}.bottom-nav small{display:block;font-size:11px}.bottom-nav a:hover{background:rgba(255,255,255,.1)}.app-form{display:grid;gap:12px}.app-form input,.app-form textarea{width:100%;border:1px solid #d9e2f2;border-radius:16px;padding:14px 15px;font:inherit}.notice{padding:14px 16px;border-radius:16px;background:#ecfdf5;color:#166534;margin:12px 0}.notice.bad{background:#fef2f2;color:#991b1b}@media(min-width:760px){.app-shell{border-radius:0;max-width:480px}.desktop-preview{max-width:980px;margin:0 auto}}@media(max-width:380px){.hero-app h1{font-size:32px}.quick-grid{grid-template-columns:1fr}.app-main{padding:14px 12px}.app-top{padding:12px}.bottom-nav{bottom:8px}}
.quick.locked{opacity:.82;filter:saturate(.75);}
.check-row{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid rgba(219,229,241,.95);border-radius:16px;background:#fff;color:#172033;font-weight:750}.check-row input{margin-top:4px;accent-color:#6d45d8}

/* Visual tests in PWA */
.test-card{border-top:4px solid var(--a,#29c6c0);overflow:hidden;}
.test-card-img{width:74px;height:74px;border-radius:18px;object-fit:cover;flex:0 0 auto;background:#fff;box-shadow:0 10px 24px rgba(39,54,91,.14);}
.visual-mobile-card{background:linear-gradient(135deg,#eefdfa,#f3edff);border-top:4px solid var(--a,#29c6c0);}
.test-hero-img{width:100%;max-height:190px;object-fit:cover;border-radius:20px;margin-top:12px;box-shadow:0 16px 34px rgba(39,54,91,.16);background:#fff;}


/* Mobile login polished layout */
.app-auth-card{
    margin: clamp(12px, 4vh, 28px) auto;
    width: 100%;
    max-width: 430px;
    padding: 26px 20px 22px;
    border-radius: 28px;
}
.app-auth-card h1{
    margin: 10px 0 8px;
    font-size: clamp(30px, 8vw, 42px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}
.app-auth-card p{
    margin: 0 0 18px;
    color: #667085;
    line-height: 1.45;
}
.app-auth-card .app-logo{
    width: 58px;
    height: 58px;
    border-radius: 20px;
    font-size: 28px;
}
.app-auth-card label{
    display: grid;
    gap: 7px;
    font-weight: 800;
    color: #172033;
}
.app-auth-card input{
    min-height: 56px;
    font-size: 16px;
    border-radius: 18px;
    background: #fff;
}
.app-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg,#7357f6,#25c5c7);
    color: #fff;
    font-weight: 900;
    font-size: 17px;
    box-shadow: 0 14px 30px rgba(72,88,220,.22);
    -webkit-appearance: none;
    appearance: none;
}
.app-note{
    margin-top: 18px;
    text-align: center;
    color: #667085;
    font-size: 16px;
}
.app-note a{color:#6d42e8;font-weight:900;text-decoration:none;}
.app-secure-note{
    margin-top: 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg,#eefdfa,#f7f2ff);
    border: 1px solid #c7f2ed;
    color: #0f766e;
    line-height: 1.45;
}
@media(max-width:520px){
    .app-shell{max-width:none; width:100%; box-shadow:none;}
    .app-main{padding:100px 14px 118px;}
    .app-auth-card{margin:12px auto 0; padding:24px 18px 20px;}
    .app-top{padding-top:calc(12px + env(safe-area-inset-top));}
    .bottom-nav{bottom:calc(10px + env(safe-area-inset-bottom)); width:calc(100% - 24px);}
}

/* APP FIXED HEADER PATCH */
@media(max-width:520px){.app-top{width:100%;}.app-main{padding-top:100px;}}


/* ===== DEFINITIVE APP HEADER FIX ===== */
.app-top{
  position:fixed !important;
  top:0 !important;
  left:50% !important;
  transform:translateX(-50%) !important;
  z-index:2147483000 !important;
}
.app-main{padding-top:104px !important;}
@media(max-width:520px){.app-main{padding-top:112px !important;}}


/* ===== SESSION / MOBILE NAV FINAL PATCH ===== */
.app-main{
    padding-bottom: calc(150px + env(safe-area-inset-bottom)) !important;
}
.bottom-nav{
    position: fixed !important;
    z-index: 2147482500 !important;
}
.app-auth-card{
    margin-bottom: calc(120px + env(safe-area-inset-bottom)) !important;
}
.top-chip{
    white-space: nowrap;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media(max-width:520px){
    .app-main{padding-bottom: calc(160px + env(safe-area-inset-bottom)) !important;}
    .app-btn{width:100% !important; min-height:58px !important; border-radius:18px !important;}
    .app-auth-card{margin-left:auto !important; margin-right:auto !important; width:calc(100% - 28px) !important;}
}


.notify-chip{position:relative;display:inline-flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:22px;background:#f0e8ff;text-decoration:none;font-size:23px;color:#6d43df;font-weight:900;margin-right:8px}
.notify-chip span{position:absolute;right:4px;top:2px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#ef4444;color:#fff;font-size:12px;display:flex;align-items:center;justify-content:center;border:2px solid #fff}
.app-chat-thread{border:1px solid #e8ddff;border-radius:24px;padding:18px;margin:16px 0;background:#fff;box-shadow:0 14px 36px rgba(60,40,120,.06)}
.app-chat-thread h3{font-size:25px;margin:0 0 14px;color:#111827}.app-chat-thread h3 small{font-size:14px;color:#6d43df;background:#f0e8ff;border-radius:999px;padding:5px 10px;margin-left:6px}
.app-message{border-radius:20px;padding:14px 16px;margin:12px 0}.app-message.teacher{background:#f6fffd;border:1px solid #c8f2ec}.app-message.psychologist{background:#f4f0ff;border:1px solid #ded3ff}.app-message b{display:block;font-size:16px;color:#111827}.app-message span{display:block;font-size:12px;color:#667085;margin:4px 0 8px}.app-message p{font-size:18px;line-height:1.45;margin:0;color:#1f2937}.app-notification{border-radius:22px;padding:16px;margin:12px 0;background:#fff;border:1px solid #e8ddff}.app-notification.new{border-left:6px solid #27c4bd;background:#f5fffd}.app-notification b{display:block;font-size:20px}.app-notification span{display:block;color:#667085;font-size:13px;margin-top:4px}.app-notification p{font-size:17px;line-height:1.45;color:#1f2937}

/* ===== APP PROFILE EDIT / LOGOUT / DELETE ===== */
.profile-hero-card{background:linear-gradient(135deg,#ffffff,#f4fffd 55%,#f7f1ff);border:1px solid #e4d7ff;box-shadow:0 20px 50px rgba(80,60,160,.08)}
.profile-hero-row{display:flex;gap:18px;align-items:center}.profile-avatar-big{width:86px;height:86px;min-width:86px;border-radius:28px;background:linear-gradient(135deg,#7357f6,#25c5c7);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:950;font-size:38px;overflow:hidden;box-shadow:0 18px 35px rgba(39,196,189,.18)}
.profile-avatar-big img{width:100%;height:100%;object-fit:cover;display:block}.profile-role-pill{display:inline-flex;margin-top:8px;padding:8px 12px;border-radius:999px;background:#eefdfa;color:#0f766e;font-weight:900;font-size:13px;border:1px solid #c7f2ed}.profile-actions-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-top:18px}.profile-form{display:grid;gap:16px}.profile-form label{display:grid;gap:8px;font-weight:900;color:#172033}.profile-form input,.profile-form textarea{width:100%;border:1px solid #dbe3f2;border-radius:18px;background:#fff;padding:15px 16px;font:inherit;color:#172033;outline:none;box-sizing:border-box}.profile-form textarea{resize:vertical;line-height:1.45}.profile-form input:focus,.profile-form textarea:focus{border-color:#25c5c7;box-shadow:0 0 0 4px rgba(37,197,199,.12)}.profile-form small{color:#667085;font-weight:700}.app-alert{margin:14px 0;padding:14px 16px;border-radius:20px;font-weight:900}.app-alert.success{background:#effdfa;border:1px solid #bdf1ea;color:#0f766e}.app-alert.error{background:#fff1f2;border:1px solid #fecdd3;color:#be123c}.danger-zone{border-color:#fecdd3;background:linear-gradient(135deg,#fff,#fff5f6)}.btn.danger,.danger{display:flex;align-items:center;justify-content:center;border:0;border-radius:18px;padding:15px 18px;background:#ef4444;color:#fff;text-decoration:none;font-weight:950;font-size:16px}.danger-light{background:#fff1f2!important;color:#be123c!important;border:1px solid #fecdd3!important}
@media(max-width:520px){.profile-hero-row{align-items:flex-start}.profile-avatar-big{width:74px;height:74px;min-width:74px;border-radius:24px;font-size:32px}.profile-actions-row{grid-template-columns:1fr}.profile-form input,.profile-form textarea{font-size:16px;min-height:54px}.profile-form textarea{min-height:120px}.card h1{word-break:break-word}}

.app-success{background:#ecfff7;border:1px solid rgba(34,197,94,.28);color:#047857;border-radius:18px;padding:14px 16px;margin:12px 0;font-weight:800}.app-notification-link{display:block;color:inherit;text-decoration:none}.app-notification em{display:inline-block;margin-top:10px;color:#7c4dff;font-style:normal;font-weight:900}.danger-zone{border-color:rgba(239,68,68,.22)}.danger{background:#ef4444!important;color:#fff!important}.danger-light{background:#fff1f2!important;color:#be123c!important;border-color:#fecdd3!important}

.app-notification-link{display:block;color:inherit;text-decoration:none}
.app-notification-link:active .app-notification{transform:scale(.99)}
.app-chat-thread.selected{border-color:rgba(124,77,255,.45);box-shadow:0 10px 30px rgba(124,77,255,.14)}
.app-reply-form{margin-top:18px}
.app-inline-form{margin-top:10px}
.app-inline-form .btn{width:100%}


/* ===== ROLE-BASED MOBILE APP FINAL ADAPTATION ===== */
.top-actions{display:flex;align-items:center;gap:8px;min-width:0}.app-brand{min-width:0}.app-brand span:last-child{min-width:0}.app-brand b,.app-brand small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:170px}.bottom-nav.nav-count-5{grid-template-columns:repeat(5,1fr)}.bottom-nav.nav-count-4{grid-template-columns:repeat(4,1fr)}.bottom-nav a.active{background:rgba(255,255,255,.14);color:#fff}.bottom-nav.nav-count-5 small{font-size:10px}.bottom-nav.nav-count-5 span{font-size:18px}.mobile-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:14px 0}.mobile-stats a{display:block;text-decoration:none;color:#172033;background:rgba(255,255,255,.94);border:1px solid #e6ddff;border-radius:24px;padding:18px;box-shadow:0 14px 35px rgba(77,91,130,.08)}.mobile-stats b{display:block;font-size:30px;line-height:1;color:#6d42e8}.mobile-stats span{display:block;margin-top:8px;color:#667085;font-weight:800}.admin-menu{display:grid;gap:12px;margin:14px 0}.admin-menu a{display:grid;grid-template-columns:38px 1fr;grid-template-rows:auto auto;column-gap:12px;text-decoration:none;color:#172033;background:#fff;border:1px solid #e6ddff;border-radius:22px;padding:16px;box-shadow:0 14px 35px rgba(77,91,130,.08);font-size:26px}.admin-menu a b{font-size:18px}.admin-menu a small{grid-column:2;color:#667085;line-height:1.35}.mobile-list{display:grid;gap:12px;margin:14px 0}.mobile-item{display:block;background:#fff;border:1px solid #e6ddff;border-radius:22px;padding:16px;box-shadow:0 14px 35px rgba(77,91,130,.08);color:#172033}.mobile-item.link{text-decoration:none}.mobile-item b{display:block;font-size:18px}.mobile-item span{display:block;color:#667085;margin-top:5px;font-weight:700;line-height:1.35}.mobile-item p{margin:8px 0 0;color:#475467;line-height:1.4}.mobile-item em{display:inline-flex;margin-top:8px;padding:5px 9px;border-radius:999px;background:#fff1f2;color:#be123c;font-style:normal;font-weight:900}.mini-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.mini-actions button,.mini-actions select{min-height:42px;border-radius:13px;border:1px solid #ddd6fe;background:#fff;color:#6d42e8;font-weight:900;padding:8px;max-width:100%}.mini-actions .danger-mini{background:#fff1f2;color:#be123c;border-color:#fecdd3}.app-form .check-row{display:flex!important;align-items:flex-start!important;width:100%;max-width:100%;gap:12px;padding:14px 16px;overflow:hidden}.app-form .check-row input[type="checkbox"]{width:22px!important;min-width:22px!important;max-width:22px!important;height:22px!important;min-height:22px!important;flex:0 0 22px!important;margin:1px 0 0!important;padding:0!important}.app-form .check-row span{display:block;min-width:0;overflow-wrap:anywhere;word-break:normal;line-height:1.35;font-size:15px}.app-auth-card{max-width:430px!important;width:calc(100% - 28px)!important;overflow:hidden}.app-auth-card h1{font-size:clamp(29px,7vw,38px)!important}.app-form textarea{max-width:100%;resize:vertical}.app-form button{max-width:100%}@media(max-width:380px){.bottom-nav{width:calc(100% - 14px);gap:2px;padding:6px;border-radius:20px}.bottom-nav a{padding:7px 2px}.bottom-nav small{font-size:9px!important}.bottom-nav span{font-size:16px!important}.app-brand b{font-size:14px}.app-brand small{font-size:11px}.app-logo{width:38px;height:38px;border-radius:14px}.top-chip{font-size:12px;padding:9px 10px;max-width:34vw}.mobile-stats{grid-template-columns:1fr}.mini-actions{grid-template-columns:1fr}.admin-menu a{grid-template-columns:32px 1fr;padding:14px;font-size:22px}.admin-menu a b{font-size:16px}.app-main{padding-left:12px!important;padding-right:12px!important}}

/* ===== FINAL VISUAL FIX 2026-05-13: wide fixed mobile header + safe registration ===== */
:root{
  --app-max-width:560px;
  --app-header-height:76px;
  --app-bottom-height:92px;
}
html,body{
  width:100%;
  min-width:0;
  overflow-x:hidden!important;
  background:linear-gradient(145deg,#eefcff 0%,#f7f1ff 58%,#ffffff 100%)!important;
}
.app-shell{
  width:100%!important;
  max-width:var(--app-max-width)!important;
  margin:0 auto!important;
  min-height:100svh!important;
  overflow:hidden!important;
  border-left:1px solid rgba(124,77,255,.08);
  border-right:1px solid rgba(36,198,200,.08);
}
.app-top{
  position:fixed!important;
  top:0!important;
  left:50%!important;
  right:auto!important;
  transform:translateX(-50%)!important;
  width:min(var(--app-max-width),100vw)!important;
  max-width:100vw!important;
  min-height:var(--app-header-height)!important;
  z-index:9999!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:calc(10px + env(safe-area-inset-top)) 16px 10px!important;
  background:rgba(255,255,255,.96)!important;
  border-bottom:1px solid rgba(124,77,255,.14)!important;
  box-shadow:0 10px 30px rgba(15,23,42,.10)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
}
.app-main{
  width:100%!important;
  max-width:100%!important;
  padding:calc(var(--app-header-height) + env(safe-area-inset-top) + 18px) 18px calc(var(--app-bottom-height) + env(safe-area-inset-bottom) + 28px)!important;
}
.app-brand{
  min-width:0!important;
  flex:1 1 auto!important;
  overflow:hidden!important;
}
.app-brand b,.app-brand small{
  max-width:230px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.top-actions{
  flex:0 0 auto!important;
  max-width:42%!important;
  justify-content:flex-end!important;
}
.top-chip,.notify-chip{
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.app-auth-card,.card,.hero-app{
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
}
.app-auth-card{
  margin-left:auto!important;
  margin-right:auto!important;
  padding:22px!important;
  border-radius:26px!important;
}
.app-auth-card h1{
  font-size:clamp(28px,7vw,38px)!important;
  line-height:1.12!important;
  letter-spacing:-.035em!important;
}
.app-form{
  width:100%!important;
  min-width:0!important;
}
.app-form input,.app-form textarea,.app-form select,.app-form button,.btn{
  max-width:100%!important;
  min-width:0!important;
}
.app-form .check-row{
  display:grid!important;
  grid-template-columns:24px minmax(0,1fr)!important;
  align-items:start!important;
  gap:12px!important;
  width:100%!important;
  max-width:100%!important;
  padding:14px!important;
  border:1px solid #d9e2f2!important;
  border-radius:18px!important;
  background:#fff!important;
  overflow:hidden!important;
}
.app-form .check-row input[type="checkbox"]{
  grid-column:1!important;
  width:22px!important;
  height:22px!important;
  min-width:22px!important;
  margin:1px 0 0!important;
  padding:0!important;
}
.app-form .check-row span,.app-form .check-row label{
  grid-column:2!important;
  display:block!important;
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.35!important;
  font-size:15px!important;
  font-weight:800!important;
  color:#1f2937!important;
}
.bottom-nav{
  position:fixed!important;
  left:50%!important;
  bottom:calc(10px + env(safe-area-inset-bottom))!important;
  transform:translateX(-50%)!important;
  width:min(calc(var(--app-max-width) - 24px),calc(100vw - 20px))!important;
  max-width:calc(100vw - 20px)!important;
  z-index:9998!important;
}
@media(max-width:620px){
  :root{--app-max-width:100vw;--app-header-height:74px;}
  .app-shell{max-width:100vw!important;border:0!important;box-shadow:none!important;}
  .app-top{width:100vw!important;border-radius:0!important;}
  .app-main{padding-left:16px!important;padding-right:16px!important;}
  .app-brand b{font-size:15px!important;}
  .app-brand small{font-size:11px!important;}
  .app-logo{width:40px!important;height:40px!important;border-radius:15px!important;}
  .top-chip{font-size:12px!important;padding:9px 11px!important;}
}
@media(max-width:380px){
  :root{--app-header-height:72px;}
  .app-main{padding-left:12px!important;padding-right:12px!important;}
  .app-top{padding-left:12px!important;padding-right:12px!important;}
  .app-brand b,.app-brand small{max-width:150px!important;}
  .top-actions{max-width:36%!important;}
  .app-auth-card{padding:18px!important;border-radius:24px!important;}
}


/* ===== APP TOP SAFETY FINAL ===== */
.app-top{top:env(safe-area-inset-top)!important;width:min(480px,100%)!important;max-width:100vw!important;overflow:visible!important;}
.app-brand{flex:1 1 auto!important;min-width:0!important;}
.app-brand b{max-width:220px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.app-brand small{max-width:220px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.top-actions{flex:0 0 auto!important;}
@media(max-width:420px){.app-brand b,.app-brand small{max-width:155px!important}.top-chip{max-width:38vw!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}}


/* ===== SafeMind architecture/jury refinements ===== */

.jury-architecture,
.architecture-block,
.arch-card,
.architecture-card {
border-radius:26px!important;
border:1px solid rgba(148,163,184,.16)!important;
background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,250,255,.92))!important;
box-shadow:0 18px 44px rgba(15,23,42,.06)!important;
}

.jury-architecture h2,
.architecture-block h2,
.arch-card h3{
letter-spacing:-0.02em!important;
font-weight:700!important;
color:#0b3450!important;
}

.arch-grid,
.architecture-grid{
gap:22px!important;
}

.arch-mini-card,
.arch-step,
.arch-service{
border-radius:20px!important;
border:1px solid rgba(125,125,255,.10)!important;
background:rgba(255,255,255,.88)!important;
box-shadow:0 8px 22px rgba(79,70,229,.05)!important;
}

.arch-mini-card p,
.arch-step p,
.arch-service p{
font-weight:400!important;
line-height:1.55!important;
color:rgba(11,52,80,.72)!important;
}

.arch-icon,
.arch-service-icon{
background:linear-gradient(135deg,#22c5c7,#7c3aed)!important;
border-radius:18px!important;
box-shadow:0 10px 24px rgba(79,70,229,.12)!important;
}

.jury-section,
.jury-about,
.jury-roadmap{
padding:28px!important;
border-radius:30px!important;
background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
box-shadow:0 16px 42px rgba(15,23,42,.05)!important;
}


/* ===== Jury architecture preview ===== */

.jury-architecture-preview{
    margin:36px auto;
    padding:32px;
    border-radius:32px;
    background:linear-gradient(180deg,#ffffff,#f7faff);
    box-shadow:0 20px 48px rgba(15,23,42,.06);
    border:1px solid rgba(148,163,184,.14);
}

.jury-arch-head{
    margin-bottom:24px;
}

.jury-arch-head h2{
    margin:10px 0 12px;
    font-size:clamp(32px,3vw,48px);
    line-height:1.1;
    color:#0b3450;
}

.jury-arch-head p{
    max-width:760px;
    color:rgba(11,52,80,.72);
    line-height:1.7;
    font-size:17px;
}

.jury-arch-image-wrap{
    border-radius:28px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 18px 42px rgba(15,23,42,.08);
}

.jury-arch-image{
    width:100%;
    display:block;
}

@media(max-width:768px){
    .jury-architecture-preview{
        padding:18px;
        border-radius:24px;
    }
}


/* ===== Premium result screen SafeMind222 ===== */
.result-premium-card{background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);border:1px solid rgba(124,77,255,.14);border-radius:30px;padding:22px;box-shadow:0 22px 50px rgba(36,50,74,.10);margin:14px 0;color:#172033;overflow:hidden}.result-premium-head{display:flex;gap:14px;align-items:center;margin-bottom:18px}.result-brain-icon{width:64px;height:64px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(135deg,rgba(38,198,200,.14),rgba(124,77,255,.16));box-shadow:inset 0 0 0 1px rgba(124,77,255,.12);font-size:30px}.result-premium-head h1{margin:0;color:#183153;font-size:clamp(26px,7vw,36px);line-height:1.05;letter-spacing:-.03em;font-weight:750}.result-premium-head p{margin:6px 0 0;color:#667085;font-size:15px;line-height:1.35}.result-premium-body{display:grid;grid-template-columns:1fr;gap:20px;align-items:center}.result-score-panel p{margin:14px 0 0;color:#24324a;line-height:1.55;font-size:15px}.result-percent-gradient{font-size:62px;line-height:1;font-weight:780;letter-spacing:-.06em;background:linear-gradient(135deg,#7357f6,#26c6c8);-webkit-background-clip:text;background-clip:text;color:transparent}.result-status-pill{display:inline-flex;align-items:center;gap:8px;margin-top:12px;padding:11px 14px;border-radius:16px;font-weight:750;border:1px solid transparent}.result-status-pill.low{background:#ecfdf5;color:#0f9d58;border-color:#bbf7d0}.result-status-pill.middle{background:#fff7ed;color:#ea580c;border-color:#fed7aa}.result-status-pill.high{background:#fff1f2;color:#e11d48;border-color:#fecdd3}.gauge-wrap{width:220px;height:135px;margin:0 auto;position:relative}.gauge-arc{position:absolute;inset:0;border-radius:220px 220px 0 0;background:conic-gradient(from 270deg at 50% 100%,#35c872 0deg,#facc15 82deg,#ff4d67 calc(var(--p)*1.8deg),#eef2f7 0deg 180deg);overflow:hidden}.gauge-arc:after{content:"";position:absolute;left:30px;right:30px;bottom:0;height:92px;border-radius:180px 180px 0 0;background:linear-gradient(180deg,#fff,#f8fbff)}.gauge-dot{position:absolute;left:calc(50% + (100px * cos((180 - var(--p)*1.8) * 1deg)) - 9px);top:calc(100% - (100px * sin((180 - var(--p)*1.8) * 1deg)) - 9px);width:18px;height:18px;border-radius:50%;background:#24324a;box-shadow:0 8px 16px rgba(36,50,74,.25)}.gauge-center{position:absolute;left:0;right:0;bottom:10px;text-align:center}.gauge-center strong{display:block;font-size:44px;color:#20304f;letter-spacing:-.04em}.gauge-center span{display:block;color:#7a8499;font-size:15px}.result-scale-card{margin-top:20px;border:1px solid #e5ecf6;border-radius:22px;background:rgba(255,255,255,.86);padding:16px;box-shadow:0 12px 28px rgba(36,50,74,.06)}.scale-levels{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}.scale-levels span{display:grid;grid-template-columns:12px 1fr;column-gap:8px;align-items:center}.scale-levels i{width:12px;height:12px;border-radius:50%}.scale-levels i.green{background:#35c872}.scale-levels i.yellow{background:#facc15}.scale-levels i.red{background:#ff4d67}.scale-levels b{font-size:13px;font-weight:700;color:#24324a}.scale-levels small{grid-column:2;color:#7a8499;font-size:12px}.premium-scale{height:12px;border-radius:999px;background:linear-gradient(90deg,#35c872 0%,#facc15 50%,#ff4d67 100%);position:relative}.premium-scale em{position:absolute;top:-6px;width:18px;height:24px;border-radius:10px;background:#24324a;box-shadow:0 8px 16px rgba(36,50,74,.24)}.recommend-title{margin:24px 0 12px;color:#7357f6;font-size:19px}.recommend-grid{display:grid;grid-template-columns:1fr;gap:10px}.recommend-card{display:grid;grid-template-columns:46px 1fr 18px;gap:10px;align-items:center;min-height:66px;padding:10px;border-radius:20px;text-decoration:none;color:#183153;border:1px solid #e5ecf6;background:#fff}.recommend-card span{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;font-size:24px}.recommend-card b{font-size:14px;line-height:1.25;font-weight:720}.recommend-card i{font-style:normal;color:#5c6b82;font-size:28px}.recommend-card.green span{background:#ecfdf5}.recommend-card.violet span{background:#f3e8ff}.recommend-card.blue span{background:#eff6ff}.recommend-card.red span{background:#fff1f2}.safety-note{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:center;margin-top:18px;padding:12px;border-radius:18px;background:linear-gradient(135deg,#f8fbff,#f5f3ff);border:1px solid #e5ecf6}.safety-note span{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:#eef6ff}.safety-note p{margin:0;color:#31527d;line-height:1.45;font-size:14px}.result-actions{margin-top:18px}@media(min-width:430px){.recommend-grid{grid-template-columns:1fr 1fr}.result-premium-card{padding:26px}.result-premium-body{grid-template-columns:1fr 220px}.result-percent-gradient{font-size:72px}}@media(max-width:380px){.result-premium-card{padding:16px;border-radius:24px}.result-brain-icon{width:52px;height:52px;border-radius:18px}.scale-levels{font-size:12px}.gauge-wrap{transform:scale(.9);transform-origin:center}.result-percent-gradient{font-size:54px}}
