/* AI APP TRAINING LAB v2 — premium interface layer */
:root{
  --bg:#07101f;
  --bg2:#0b1628;
  --panel:#101d31;
  --panel2:#14243c;
  --line:rgba(153,184,222,.18);
  --text:#f7f9ff;
  --muted:#9eafc7;
  --cyan:#55dcff;
  --blue:#5b8cff;
  --violet:#a77cff;
  --good:#54dda5;
  --warn:#ffd166;
  --danger:#ff7b8a;
  --brand-gradient:linear-gradient(118deg,#087fa7 0%,#3a66d2 48%,#7750c9 100%);
  --soft-gradient:linear-gradient(135deg,rgba(30,198,235,.12),rgba(98,99,242,.11) 52%,rgba(157,90,236,.12));
  --surface-glass:rgba(13,28,49,.82);
  --surface-raised:rgba(16,33,57,.88);
  --shadow-sm:0 8px 24px rgba(0,0,0,.18);
  --shadow:0 22px 70px rgba(0,0,0,.32);
  --shadow-xl:0 38px 110px rgba(0,0,0,.42);
  --radius:24px;
  --radius-lg:32px;
  --radius-sm:14px;
  --nav-width:248px;
  font-family:Inter,"SF Pro Display","Hiragino Sans","Yu Gothic UI",Meiryo,system-ui,-apple-system,sans-serif;
}

body.light{
  --bg:#f2f6fc;
  --bg2:#f8faff;
  --panel:#ffffff;
  --panel2:#f2f6fc;
  --line:rgba(34,67,108,.13);
  --text:#14243d;
  --muted:#607087;
  --cyan:#087a9a;
  --blue:#336fd2;
  --violet:#7150bd;
  --good:#167958;
  --warn:#966300;
  --danger:#b42f43;
  --surface-glass:rgba(255,255,255,.84);
  --surface-raised:rgba(255,255,255,.94);
  --shadow-sm:0 8px 28px rgba(38,68,105,.08);
  --shadow:0 22px 70px rgba(36,70,111,.11);
  --shadow-xl:0 34px 100px rgba(37,74,119,.15);
}

html{
  background:var(--bg);
  overscroll-behavior-x:none;
}

body{
  min-height:100dvh;
  background:
    radial-gradient(circle at 88% -12%,rgba(116,78,232,.21),transparent 31%),
    radial-gradient(circle at -8% 20%,rgba(20,184,227,.13),transparent 28%),
    linear-gradient(180deg,var(--bg2),var(--bg));
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

body.light{
  background:
    radial-gradient(circle at 88% -8%,rgba(120,82,229,.12),transparent 31%),
    radial-gradient(circle at -8% 18%,rgba(23,190,225,.11),transparent 29%),
    linear-gradient(180deg,#f9fbff 0%,#f1f6fc 54%,#edf3fa 100%);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:.16;
  background-image:linear-gradient(rgba(133,164,205,.11) 1px,transparent 1px),linear-gradient(90deg,rgba(133,164,205,.11) 1px,transparent 1px);
  background-size:48px 48px;
  mask-image:linear-gradient(to bottom,black,transparent 76%);
}

::selection{background:rgba(67,139,255,.28);color:var(--text)}
*{scrollbar-width:thin;scrollbar-color:rgba(112,145,189,.35) transparent}
*::-webkit-scrollbar{width:8px;height:8px}
*::-webkit-scrollbar-thumb{background:rgba(112,145,189,.35);border-radius:99px}

button,input,textarea,select{-webkit-font-smoothing:antialiased}
button{letter-spacing:.002em}
button:disabled{cursor:not-allowed}

.app-header{
  height:76px;
  padding:10px max(18px,env(safe-area-inset-left)) 10px max(18px,env(safe-area-inset-right));
  background:rgba(7,16,31,.74);
  border-bottom:1px solid rgba(142,179,224,.14);
  box-shadow:0 1px 0 rgba(255,255,255,.025),0 12px 34px rgba(0,0,0,.08);
  backdrop-filter:blur(24px) saturate(160%);
  -webkit-backdrop-filter:blur(24px) saturate(160%);
}

body.light .app-header{
  background:rgba(249,251,255,.78);
  border-color:rgba(31,67,110,.09);
  box-shadow:0 1px 0 rgba(255,255,255,.8),0 12px 34px rgba(43,72,108,.055);
}

.brand{gap:12px;min-width:0}
.brand-icon{position:relative;display:grid;place-items:center;flex:0 0 auto}
.brand-icon::after{
  content:"";
  position:absolute;
  inset:-4px;
  border-radius:17px;
  background:linear-gradient(135deg,rgba(68,213,255,.35),rgba(152,99,246,.28));
  filter:blur(9px);
  opacity:.42;
  z-index:-1;
}
.brand img{border-radius:14px;box-shadow:0 8px 22px rgba(23,116,219,.25),inset 0 0 0 1px rgba(255,255,255,.18)}
.brand-copy b{font-size:12px;letter-spacing:.115em;white-space:nowrap}
.brand-copy small{font-size:10px;letter-spacing:.025em;margin-top:6px}

.header-context{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:auto auto;
  grid-template-rows:auto auto;
  column-gap:8px;
  align-items:center;
  padding:8px 15px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.035);
}
.header-context .live-dot{grid-row:1/3;width:8px;height:8px;border-radius:50%;background:var(--good);box-shadow:0 0 0 5px rgba(84,221,165,.1)}
.header-context b{font-size:10px;line-height:1.1;letter-spacing:.12em}
.header-context small{font-size:9px;color:var(--muted);margin-top:3px}
body.light .header-context{background:rgba(255,255,255,.8);box-shadow:var(--shadow-sm)}

.header-actions{gap:9px}
.icon-btn{
  display:grid;
  place-items:center;
  width:44px;
  min-width:44px;
  height:44px;
  border-radius:15px;
  background:rgba(255,255,255,.055);
  box-shadow:inset 0 1px rgba(255,255,255,.05);
  transition:transform .18s ease,background .18s ease,border-color .18s ease;
}
.icon-btn:hover{transform:translateY(-1px);background:rgba(95,154,255,.11);border-color:rgba(104,180,255,.36)}
.icon-btn span{display:block;font-size:17px;line-height:1}
body.light .icon-btn{background:rgba(255,255,255,.84);box-shadow:var(--shadow-sm)}

.status-chip{font-weight:800;box-shadow:inset 0 1px rgba(255,255,255,.08)}

.main-content{
  width:100%;
  max-width:1540px;
  padding:98px 20px calc(105px + env(safe-area-inset-bottom));
}

.screen{animation:premiumScreenIn .36s cubic-bezier(.2,.7,.2,1)}
@keyframes premiumScreenIn{from{opacity:0;transform:translateY(10px) scale(.997)}to{opacity:1;transform:none}}

.workflow-dock{
  display:none;
  align-items:center;
  justify-content:center;
  width:min(100%,920px);
  margin:0 auto 30px;
  padding:9px;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--surface-glass);
  box-shadow:var(--shadow-sm);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
body[data-screen="prompts"] .workflow-dock,
body[data-screen="editor"] .workflow-dock,
body[data-screen="preview"] .workflow-dock,
body[data-screen="export"] .workflow-dock{display:flex}

.workflow-dock button{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  min-height:54px;
  padding:8px 13px;
  border:0;
  border-radius:14px;
  color:var(--muted);
  background:transparent;
  cursor:pointer;
  transition:.2s ease;
}
.workflow-dock button>span{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  flex:0 0 32px;
  border:1px solid var(--line);
  border-radius:11px;
  font-size:12px;
  font-weight:900;
  background:rgba(255,255,255,.035);
}
.workflow-dock button div{display:flex;flex-direction:column;align-items:flex-start;line-height:1.05}
.workflow-dock button small{font-size:8px;letter-spacing:.13em;font-weight:900;opacity:.75}
.workflow-dock button b{font-size:11px;margin-top:5px;white-space:nowrap}
.workflow-dock>i{width:28px;height:1px;background:var(--line);position:relative;flex:0 1 28px}
.workflow-dock>i::after{content:"";position:absolute;right:0;top:-2px;width:5px;height:5px;border-top:1px solid var(--muted);border-right:1px solid var(--muted);transform:rotate(45deg)}
.workflow-dock button.current{
  color:var(--text);
  background:var(--soft-gradient);
  box-shadow:inset 0 0 0 1px rgba(84,164,255,.13);
}
.workflow-dock button.current>span{border-color:transparent;color:#fff;background:var(--brand-gradient);box-shadow:0 8px 20px rgba(68,112,235,.24)}
.workflow-dock button.complete{color:var(--text)}
.workflow-dock button.complete>span{border-color:rgba(38,178,126,.22);color:var(--good);background:rgba(47,199,142,.09)}
.workflow-dock button:hover{color:var(--text);background:rgba(104,151,227,.08)}

.hero-surface{
  position:relative;
  min-height:min(680px,calc(100dvh - 112px));
  padding:clamp(28px,4.3vw,68px);
  border:1px solid var(--line);
  border-radius:clamp(28px,3.4vw,42px);
  background:
    linear-gradient(135deg,rgba(255,255,255,.055),rgba(255,255,255,.015)),
    radial-gradient(circle at 86% 16%,rgba(119,72,231,.16),transparent 32%),
    radial-gradient(circle at 5% 88%,rgba(18,190,232,.09),transparent 28%),
    rgba(8,20,38,.58);
  box-shadow:var(--shadow-xl),inset 0 1px rgba(255,255,255,.06);
  overflow:hidden;
}
.hero-surface::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.26;
  background-image:radial-gradient(circle,rgba(145,180,221,.42) 1px,transparent 1px);
  background-size:24px 24px;
  mask-image:linear-gradient(110deg,black,transparent 45%);
}
body.light .hero-surface{
  background:
    linear-gradient(135deg,rgba(255,255,255,.92),rgba(250,252,255,.72)),
    radial-gradient(circle at 86% 16%,rgba(119,72,231,.11),transparent 32%),
    radial-gradient(circle at 5% 88%,rgba(18,190,232,.08),transparent 28%);
  box-shadow:0 34px 100px rgba(35,68,110,.13),inset 0 1px #fff;
}
.hero-copy,.hero-visual{position:relative;z-index:1}
.hero-copy{max-width:680px}
.hero-copy h1{font-size:clamp(40px,5.1vw,74px);line-height:1.07;letter-spacing:-.052em;margin:23px 0 22px}
.hero-copy h1 span{background:linear-gradient(92deg,#7ae7ff 0%,#78adff 44%,#bf93ff 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
body.light .hero-copy h1 span{background:linear-gradient(92deg,#087d9d 0%,#346fc8 48%,#7852bd 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-copy>p{max-width:640px;font-size:clamp(15px,1.45vw,19px);line-height:1.9;letter-spacing:.012em}
.eyebrow{padding:9px 14px;font-size:10px;letter-spacing:.135em;background:rgba(41,204,236,.07)}

.hero-actions{align-items:stretch;margin-top:31px;gap:12px}
.hero-actions .btn{min-width:220px}
.btn{
  border-radius:15px;
  font-weight:800;
  box-shadow:inset 0 1px rgba(255,255,255,.055);
  transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease,border-color .18s ease,filter .18s ease;
}
.btn:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(0,0,0,.11),inset 0 1px rgba(255,255,255,.09)}
.btn:active{transform:translateY(0) scale(.985)}
.btn.primary{background:var(--brand-gradient);box-shadow:0 13px 34px rgba(59,111,235,.25),inset 0 1px rgba(255,255,255,.25)}
.btn.primary:hover{filter:saturate(1.08) brightness(1.04);box-shadow:0 17px 38px rgba(67,107,229,.31),inset 0 1px rgba(255,255,255,.28)}
.btn.secondary{border-color:var(--line);background:rgba(255,255,255,.055)}
body.light .btn.secondary{background:rgba(255,255,255,.82);box-shadow:0 8px 20px rgba(36,67,106,.06)}
.btn.xl{min-height:64px;padding:13px 20px;font-size:14px}
.action-with-note{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;text-align:left;min-width:290px!important}
.action-with-note .action-symbol{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:rgba(255,255,255,.16);font-size:12px}
.action-with-note>span:nth-child(2){display:flex;flex-direction:column}
.action-with-note small{font-size:9px;font-weight:650;opacity:.76;margin-top:4px}
.action-with-note>i{font-style:normal;font-size:19px}
.hero-links{margin-top:17px;gap:19px}
.text-btn{font-size:12px;font-weight:800;text-decoration:none;position:relative}
.text-btn::after{content:"";position:absolute;left:2px;right:2px;bottom:4px;height:1px;background:currentColor;transform:scaleX(0);transform-origin:left;transition:transform .18s ease}
.text-btn:hover::after{transform:scaleX(1)}
.hero-assurance{display:flex;flex-wrap:wrap;gap:14px 18px;margin-top:25px;color:var(--muted);font-size:10px;font-weight:700}
.hero-assurance span{display:flex;align-items:center;gap:6px}
.hero-assurance b{display:grid;place-items:center;width:18px;height:18px;border-radius:7px;background:rgba(57,204,150,.1);color:var(--good);font-size:10px}

.hero-visual{min-height:420px}
.orb{filter:blur(34px);opacity:.9}
.orb-a{width:220px;height:220px;left:0;top:0;background:rgba(27,202,245,.16)}
.orb-b{width:260px;height:260px;right:-3%;bottom:-6%;background:rgba(155,92,255,.18)}
.floating-chip{
  position:absolute;
  z-index:4;
  display:flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border:1px solid rgba(140,189,246,.22);
  border-radius:12px;
  color:#dbeaff;
  background:rgba(8,20,38,.82);
  box-shadow:0 16px 42px rgba(0,0,0,.28);
  backdrop-filter:blur(14px);
  font-size:9px;
  font-weight:900;
  letter-spacing:.1em;
}
.floating-chip>span{color:#66def9}
.chip-code{left:-10px;top:18%;animation:floatChip 5.2s ease-in-out infinite}
.chip-live{right:-8px;bottom:19%;animation:floatChip 5.2s .9s ease-in-out infinite}
.chip-live>span{color:#51e0a2;font-size:8px;text-shadow:0 0 12px #51e0a2}
@keyframes floatChip{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}

.visual-window{
  width:min(100%,620px);
  border-color:rgba(123,181,247,.27);
  border-radius:28px;
  background:linear-gradient(150deg,rgba(14,31,57,.98),rgba(5,14,29,.98));
  box-shadow:0 36px 100px rgba(0,0,0,.48),inset 0 1px rgba(255,255,255,.08),0 0 0 1px rgba(31,137,239,.04);
  transform:perspective(1200px) rotateY(-4deg) rotateX(1.5deg);
}
.visual-top{height:48px;padding:0 17px;background:rgba(255,255,255,.025)}
.visual-top i{width:8px;height:8px}
.visual-top span{font-size:10px}
.visual-top b{margin-left:auto;color:#7790ad;font-size:8px;letter-spacing:.16em}
.visual-body{grid-template-columns:1.15fr .85fr;gap:18px;padding:24px}
.visual-code{
  min-height:292px;
  padding:22px 18px;
  border-radius:18px;
  background:linear-gradient(160deg,#06101f,#040a15);
  border-color:rgba(94,145,209,.15);
  box-shadow:inset 0 1px 16px rgba(0,0,0,.18);
  color:#83a0c1;
}
.code-line{display:flex;align-items:center;min-height:37px;white-space:nowrap}
.code-line small{display:inline-block;width:28px;color:#3f526b;font:10px/1 ui-monospace,monospace;user-select:none}
.code-line b{color:#5ddaf6;font-weight:650}
.code-line em{color:#bc8aff;font-style:normal}
.code-line strong{color:#eff6ff;font-weight:700}
.code-line.dim{color:#68809d;font-size:11px}
.typing-line{width:72%;height:7px;margin:16px 0 0 28px;border-radius:99px;background:linear-gradient(90deg,rgba(72,138,228,.34),rgba(72,138,228,.06));position:relative;overflow:hidden}
.typing-line::after{content:"";position:absolute;inset:0;width:34%;background:#54d7f6;box-shadow:0 0 16px #44c7eb;animation:typing 2.6s ease-in-out infinite}
@keyframes typing{0%{transform:translateX(-110%)}100%{transform:translateX(310%)}}
.visual-phone{
  position:relative;
  min-height:278px;
  border:7px solid #182641;
  border-radius:37px;
  background:radial-gradient(circle at 50% 12%,rgba(104,225,255,.3),transparent 28%),linear-gradient(155deg,#1769bc 0%,#3f54c9 48%,#7537ad 100%);
  box-shadow:0 20px 45px rgba(0,0,0,.48),inset 0 1px rgba(255,255,255,.2);
  overflow:hidden;
}
.visual-phone::after{content:"";position:absolute;width:170px;height:170px;border:1px solid rgba(255,255,255,.12);border-radius:50%;bottom:-94px;right:-55px;box-shadow:0 0 0 24px rgba(255,255,255,.03),0 0 0 48px rgba(255,255,255,.025)}
.phone-island{position:absolute;top:8px;width:54px;height:13px;border-radius:99px;background:#0a1324}
.visual-phone .spark{font-size:48px}
.visual-phone strong{font-size:21px;letter-spacing:.08em;z-index:1}
.visual-phone small{display:flex;align-items:center;gap:5px;color:#e2edff;font-size:10px;z-index:1}
.visual-phone small span{width:6px;height:6px;border-radius:50%;background:#52ecac;box-shadow:0 0 10px #52ecac}
.visual-phone .fake-button{display:flex;align-items:center;gap:12px;padding:10px 17px;z-index:1;font-size:10px;box-shadow:0 10px 25px rgba(9,33,92,.25)}
.visual-phone .fake-button b{font-size:13px}
.visual-status{display:flex;justify-content:space-between;align-items:center;min-height:39px;padding:0 19px;border-top:1px solid rgba(127,171,224,.13);color:#7287a1;font-size:9px}
.visual-status span:first-child{color:#8aa0ba}
.visual-status b{color:#56dfa6}

.resume-project{
  width:min(100%,880px);
  margin:22px auto 0;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:14px;
  padding:15px 18px;
  text-align:left;
  border:1px solid rgba(74,145,234,.23);
  border-radius:18px;
  color:var(--text);
  background:var(--soft-gradient),var(--surface-raised);
  box-shadow:var(--shadow-sm);
  cursor:pointer;
  transition:.2s ease;
}
.resume-project:hover{transform:translateY(-2px);border-color:rgba(74,145,234,.38);box-shadow:var(--shadow)}
.resume-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:14px;color:#fff;background:var(--brand-gradient);box-shadow:0 10px 24px rgba(61,111,227,.25)}
.resume-project>span:nth-child(2){display:grid;min-width:0}
.resume-project small{font-size:9px;color:var(--muted);font-weight:800;letter-spacing:.08em}
.resume-project b{margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.resume-project em{margin-top:4px;color:var(--muted);font-size:10px;font-style:normal}
.resume-project>i{font-style:normal;font-size:11px;font-weight:850;color:var(--blue);white-space:nowrap}

.section-intro{margin:clamp(54px,7vw,88px) auto 24px;text-align:center}
.section-intro>span{color:var(--cyan);font-size:9px;font-weight:900;letter-spacing:.18em}
.section-intro h2{margin:10px 0 8px;font-size:clamp(27px,3vw,42px);letter-spacing:-.035em}
.section-intro p{margin:0;color:var(--muted);font-size:13px;line-height:1.7}
.compact-intro{margin-top:clamp(52px,6vw,76px)}

.steps-row{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:13px;
  max-width:1180px;
  margin:0 auto;
}
.step-card{
  position:relative;
  min-height:236px;
  padding:24px 20px 21px;
  overflow:hidden;
  color:var(--text);
  background:linear-gradient(150deg,rgba(20,42,71,.86),rgba(8,20,38,.84));
  border:1px solid var(--line);
  border-radius:23px;
  box-shadow:var(--shadow-sm),inset 0 1px rgba(255,255,255,.05);
  cursor:pointer;
  transition:transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .22s ease,border-color .22s ease;
}
.step-card::after{content:"";position:absolute;width:110px;height:110px;border-radius:50%;right:-45px;top:-46px;background:radial-gradient(circle,rgba(87,150,245,.17),transparent 65%);transition:transform .25s ease}
body.light .step-card{background:linear-gradient(150deg,#fff,#f7faff);box-shadow:0 14px 38px rgba(40,72,112,.075),inset 0 1px #fff}
.step-card:hover{transform:translateY(-6px);border-color:rgba(83,158,243,.34);box-shadow:0 22px 55px rgba(0,0,0,.17),inset 0 1px rgba(255,255,255,.08)}
.step-card:hover::after{transform:scale(1.25)}
body.light .step-card:hover{box-shadow:0 22px 55px rgba(39,76,122,.12)}
.step-card>b{display:block;font-size:9px;letter-spacing:.16em}
.step-icon{width:58px;height:58px;margin:18px auto 15px;border-radius:18px;background:var(--soft-gradient);box-shadow:inset 0 0 0 1px rgba(86,167,255,.11);font-size:20px}
.step-card:nth-child(2) .step-icon{background:linear-gradient(135deg,rgba(75,132,255,.17),rgba(113,82,238,.18))}
.step-card:nth-child(3) .step-icon{background:linear-gradient(135deg,rgba(63,205,224,.16),rgba(72,128,244,.17))}
.step-card:nth-child(4) .step-icon{background:linear-gradient(135deg,rgba(68,211,157,.15),rgba(47,164,212,.16));color:var(--good)}
.step-card h2{font-size:17px;line-height:1.45;margin:0}
.step-card p{margin:8px 0 0;color:var(--muted);font-size:10px;line-height:1.55}

.home-feature-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:1220px;margin:0 auto}
.feature-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:13px;
  min-height:116px;
  padding:18px;
  color:var(--text);
  background:rgba(255,255,255,.035);
  border-radius:20px;
  box-shadow:inset 0 1px rgba(255,255,255,.04);
  transition:.2s ease;
}
body.light .feature-card{background:rgba(255,255,255,.76);box-shadow:var(--shadow-sm)}
.feature-card:hover{transform:translateY(-3px);border-color:rgba(83,158,243,.32);background:rgba(76,130,226,.07);box-shadow:var(--shadow)}
.feature-card>span{display:grid;place-items:center;width:43px;height:43px;margin:0;border-radius:14px;background:var(--soft-gradient);font-size:17px}
.feature-card div{min-width:0}
.feature-card b{font-size:13px;line-height:1.3}
.feature-card small{font-size:9px;line-height:1.45}
.feature-card>i{color:var(--muted);font-size:15px;font-style:normal;transition:transform .2s ease}
.feature-card:hover>i{transform:translateX(3px);color:var(--blue)}

.privacy-banner{
  max-width:1220px;
  margin:19px auto 0;
  align-items:center;
  padding:18px 20px;
  border-radius:20px;
  background:linear-gradient(135deg,rgba(43,193,139,.08),rgba(39,139,192,.05));
  box-shadow:inset 0 1px rgba(255,255,255,.035);
}
.shield-icon{width:44px;height:44px;flex-basis:44px;border-radius:15px;background:rgba(44,193,139,.09);font-size:16px}
.privacy-banner>div:last-child{display:grid}
.privacy-banner small{margin-bottom:3px;color:var(--good);font-size:8px;font-weight:900;letter-spacing:.15em}
.privacy-banner b{font-size:13px}
.privacy-banner p{font-size:10px}

.screen-heading{margin:4px 0 25px;align-items:flex-end}
.screen-heading h1{margin:11px 0 8px;font-size:clamp(32px,4.2vw,52px);letter-spacing:-.045em}
.screen-heading.compact h1{font-size:clamp(30px,3.7vw,46px)}
.screen-heading p{font-size:13px;line-height:1.65}
.step-pill{font-size:9px;letter-spacing:.15em;padding:8px 11px}

.project-bar{
  min-height:70px;
  padding:10px 13px 10px 17px;
  margin-bottom:13px;
  border-radius:19px;
  background:var(--surface-raised);
  box-shadow:var(--shadow-sm),inset 0 1px rgba(255,255,255,.06);
}
body.light .project-bar{box-shadow:0 12px 34px rgba(36,69,109,.075),inset 0 1px #fff}
.app-name-field{font-size:9px;letter-spacing:.08em;text-transform:uppercase}
.app-name-field input{padding:10px 12px;font-size:15px;letter-spacing:0;text-transform:none;background:rgba(255,255,255,.035)}
body.light .app-name-field input{background:#f5f8fc}
.mode-toggle{padding:8px 10px;border-radius:13px;background:rgba(41,193,146,.07);color:var(--good);font-weight:800}

.notice{border-radius:17px;background:var(--surface-raised);box-shadow:var(--shadow-sm)}
.notice>span{border-radius:11px}

.editor-toolbar,.preview-controls{
  gap:7px;
  padding:9px;
  border-color:rgba(133,170,216,.17);
  background:linear-gradient(180deg,#101c2f,#0b1628);
  box-shadow:0 15px 40px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.045);
}
.editor-toolbar{border-radius:18px 18px 0 0}
.editor-toolbar button,.preview-controls button,.segmented button{min-height:40px;padding:8px 12px;border-radius:11px;color:#b9c8db;background:rgba(255,255,255,.045);font-size:11px;font-weight:750}
.editor-toolbar button:hover,.preview-controls button:hover{color:#f5f8ff;background:rgba(73,153,255,.13)}
.font-size-control{color:#93a7c2}
.font-size-control select{min-height:38px;color:#c8d6e8;background:#13233a;border-color:rgba(139,174,215,.18)}

.code-editor-wrap{
  height:clamp(460px,64dvh,860px);
  grid-template-columns:58px minmax(0,1fr);
  border-color:rgba(133,170,216,.17);
  background:#07101f;
  box-shadow:0 28px 75px rgba(0,0,0,.23);
}
.line-numbers{padding:19px 11px;color:#465a76;background:#081322;border-color:rgba(132,169,216,.08);font-size:13px;line-height:1.72}
.code-editor-wrap textarea{padding:19px 20px;background:linear-gradient(145deg,#07101f,#060d1a);color:#dceaff;caret-color:#61e0ff;font-size:14px;line-height:1.72}
.code-editor-wrap textarea::placeholder{color:#536681}
.editor-statusbar{
  min-height:44px;
  padding:10px 14px;
  border-color:rgba(133,170,216,.17);
  border-radius:0 0 18px 18px;
  color:#8195af;
  background:#0b1628;
  box-shadow:0 18px 50px rgba(0,0,0,.16);
}
.editor-statusbar .saved{padding:4px 8px;border-radius:8px;color:#62dca7;background:rgba(51,193,140,.07)}
.privacy-inline{padding-left:9px;border-left:1px solid rgba(133,170,216,.16)}

.preview-controls{border-radius:18px;margin-bottom:16px;overflow-x:auto}
.segmented{border-color:rgba(137,173,216,.16);background:rgba(0,0,0,.1)}
.segmented button.active{background:linear-gradient(120deg,rgba(42,197,232,.24),rgba(119,82,235,.28));box-shadow:inset 0 0 0 1px rgba(118,178,255,.12)}
.preview-workspace{gap:18px}
.preview-stage{background:#050a13;box-shadow:0 22px 70px rgba(0,0,0,.25)}
.preview-stage.framed{border-color:#14223a;border-width:10px;box-shadow:0 30px 90px rgba(0,0,0,.38),0 0 0 1px rgba(110,177,255,.13),inset 0 1px rgba(255,255,255,.08)}
.device-speaker{background:#31435f}
.preview-empty>span{display:grid;place-items:center;width:58px;height:58px;margin:0 auto;border-radius:19px;background:var(--soft-gradient);font-size:23px}
.preview-empty h2{font-size:19px}
.preview-empty p{font-size:12px;line-height:1.6}
.console-panel{border-radius:20px;border-color:rgba(133,170,216,.17);background:linear-gradient(160deg,#0d1829,#091322);box-shadow:0 24px 60px rgba(0,0,0,.22),inset 0 1px rgba(255,255,255,.035)}
.console-tabs button{color:#8fa1b8;font-size:11px;font-weight:800}
.console-tabs button.active{color:#67def7;background:rgba(50,216,255,.065)}
.console-content{min-height:210px}
.console-empty{font-size:11px;color:#71859e}
.console-footer{border-color:rgba(133,170,216,.13)}
.console-footer .btn{color:#9eb0c6;background:rgba(255,255,255,.04)}

.card{background:var(--surface-raised);box-shadow:var(--shadow-sm),inset 0 1px rgba(255,255,255,.055)}
body.light .card{background:rgba(255,255,255,.88);box-shadow:0 16px 48px rgba(36,70,111,.08),inset 0 1px #fff}

.save-summary{padding:20px;border-radius:23px}
.save-summary img{border-radius:21px;box-shadow:0 13px 30px rgba(31,111,211,.22)}
.save-summary small{font-size:9px;letter-spacing:.1em;color:var(--muted)}
.save-summary h2{font-size:22px;letter-spacing:-.02em}

.export-grid{gap:14px}
.export-card{
  position:relative;
  min-height:265px;
  padding:24px;
  overflow:hidden;
  border-radius:23px;
  background:var(--surface-raised);
  box-shadow:var(--shadow-sm),inset 0 1px rgba(255,255,255,.055);
  transition:.22s ease;
}
.export-card::after{content:"";position:absolute;right:-55px;top:-58px;width:145px;height:145px;border-radius:50%;background:radial-gradient(circle,rgba(90,147,237,.13),transparent 68%)}
.export-card:hover{transform:translateY(-4px);border-color:rgba(83,158,243,.34);box-shadow:var(--shadow)}
.export-card.primary-card{background:linear-gradient(145deg,rgba(27,188,224,.14),rgba(62,105,232,.13) 54%,rgba(126,76,222,.13)),var(--surface-raised);border-color:rgba(67,161,237,.29)}
.export-icon{min-width:62px;height:45px;border-radius:14px;letter-spacing:.08em;background:rgba(74,147,239,.1)}
.export-card.primary-card .export-icon{color:#fff;background:var(--brand-gradient);box-shadow:0 12px 28px rgba(60,111,228,.24)}
.export-card h2{font-size:20px;letter-spacing:-.02em}
.export-card p{font-size:12px;line-height:1.7}
.export-card .btn{position:relative;z-index:1;width:100%;margin-top:auto}

.device-help,.projects-section{padding:22px;border-radius:23px}
.device-help details{border-color:var(--line)}
.device-help summary{padding:3px 0;font-size:13px}
.device-help p{font-size:12px}

.sample-grid{gap:15px}
.sample-card{border-radius:24px;background:var(--surface-raised);box-shadow:var(--shadow-sm);transition:.22s ease}
body.light .sample-card{background:rgba(255,255,255,.9)}
.sample-card:hover{transform:translateY(-5px);border-color:rgba(83,158,243,.3);box-shadow:var(--shadow)}
.sample-preview{height:172px;padding:20px}
.sample-preview::after{content:"";position:absolute;inset:auto 14px 14px auto;width:44px;height:44px;border-radius:15px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.1);backdrop-filter:blur(8px)}
.sample-glyph{font-size:57px}
.sample-body{padding:19px}
.sample-body h2{font-size:18px}
.sample-body p{min-height:43px;font-size:11px;line-height:1.65}
.sample-meta span{font-size:9px;background:rgba(92,142,218,.05)}

.chip-row{gap:8px;padding:3px 2px 12px}
.chip-row button{min-height:42px;padding:9px 15px;border-radius:99px;background:var(--surface-raised);font-size:11px;font-weight:750;box-shadow:var(--shadow-sm)}
.chip-row button.active{color:#fff;border-color:transparent;background:var(--brand-gradient);box-shadow:0 10px 25px rgba(67,112,229,.23)}
.prompt-list{gap:14px}
.prompt-card{padding:21px;border-radius:22px;background:var(--surface-raised);box-shadow:var(--shadow-sm);transition:.2s ease}
.prompt-card:hover{border-color:rgba(83,158,243,.3);box-shadow:var(--shadow)}
.prompt-card h2{font-size:18px}
.prompt-card p{font-size:11px;line-height:1.6}
.prompt-code{max-height:245px;padding:15px;border:1px solid rgba(128,166,213,.12);border-radius:15px;background:linear-gradient(150deg,#07101f,#050c18);color:#c6d7ed;font-size:11px}
.repair-prompts{padding:23px;border-radius:23px}
.repair-item{padding:12px 13px;border-radius:14px;background:rgba(255,255,255,.025)}
.repair-item span{font-size:11px;line-height:1.5}

.guide-timeline{gap:12px;position:relative}
.guide-step{grid-template-columns:58px 1fr;gap:16px;padding:19px;border-radius:20px;background:var(--surface-raised);box-shadow:var(--shadow-sm);transition:.2s ease}
.guide-step:hover{transform:translateX(3px);border-color:rgba(83,158,243,.28)}
.guide-number{width:54px;height:54px;border-radius:17px;background:var(--soft-gradient);box-shadow:inset 0 0 0 1px rgba(84,162,255,.1)}
.guide-step h2{font-size:16px}
.guide-step p{font-size:12px;line-height:1.65}
.cloudflare-guide{padding:24px;border-radius:23px}
.cloudflare-guide li{padding-left:4px;color:var(--muted);font-size:12px}

.instructor-screen{border-radius:32px;box-shadow:var(--shadow-xl)}
.instructor-bg{border-radius:32px;background:radial-gradient(circle at 15% 10%,rgba(36,207,255,.2),transparent 30%),radial-gradient(circle at 90% 80%,rgba(145,75,240,.22),transparent 33%),linear-gradient(145deg,#071225,#0b1a31)}
.instructor-content h1{letter-spacing:-.045em}
.instructor-steps span{background:rgba(255,255,255,.035);backdrop-filter:blur(10px)}
.qr-card{padding:23px;border-radius:30px;box-shadow:0 35px 100px rgba(0,0,0,.45),inset 0 1px #fff}
.qr-wrap{border-radius:19px}

.settings-grid{gap:14px}
.settings-card{padding:22px;border-radius:23px}
.settings-card h2{font-size:18px}
.settings-card>label{font-size:12px}
.toggle-row small{font-size:10px;line-height:1.5}
.cautions{padding:23px;border-radius:23px}
.caution-grid p{padding:14px;border-radius:14px;background:rgba(255,189,74,.035);font-size:11px}

.bottom-nav{
  left:10px;
  right:10px;
  bottom:max(8px,env(safe-area-inset-bottom));
  padding:7px 7px;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(8,18,34,.86);
  box-shadow:0 18px 50px rgba(0,0,0,.32),inset 0 1px rgba(255,255,255,.055);
  backdrop-filter:blur(24px) saturate(150%);
  -webkit-backdrop-filter:blur(24px) saturate(150%);
}
body.light .bottom-nav{background:rgba(255,255,255,.88);box-shadow:0 18px 48px rgba(38,69,108,.16),inset 0 1px #fff}
.bottom-nav button{min-height:53px;border-radius:16px;font-size:9px;font-weight:750;transition:.18s ease}
.bottom-nav button span{display:grid;place-items:center;width:27px;height:25px;border-radius:9px;font-size:16px}
.bottom-nav button.active{color:var(--text);background:var(--soft-gradient)}
.bottom-nav button.active span{color:#fff;background:var(--brand-gradient);box-shadow:0 7px 17px rgba(63,109,224,.23)}

.sheet-backdrop,.modal-backdrop{background:rgba(3,8,17,.66);backdrop-filter:blur(12px)}
.bottom-sheet{border-radius:28px 28px 20px 20px;background:var(--surface-raised);box-shadow:var(--shadow-xl)}
.more-grid button{border-radius:18px;background:rgba(255,255,255,.035);transition:.18s ease}
.more-grid button:hover{background:var(--soft-gradient);border-color:rgba(83,158,243,.28)}
.modal-card{padding:24px;border-radius:25px;background:var(--surface-raised);box-shadow:var(--shadow-xl)}
.modal-card h2{letter-spacing:-.025em}
.candidate-item{padding:14px;border-radius:15px;background:rgba(255,255,255,.035)}
.toast{padding:14px 16px;border-radius:16px;background:rgba(10,24,44,.96);box-shadow:0 18px 55px rgba(0,0,0,.3)}
body.light .toast{background:rgba(255,255,255,.98);box-shadow:0 18px 55px rgba(37,69,110,.16)}
.update-banner{border-radius:18px;background:var(--surface-raised)}

.onboarding-card{padding:28px 25px;border-radius:30px;background:linear-gradient(160deg,#122642,#071225);box-shadow:0 40px 120px rgba(0,0,0,.5)}
body.light .onboarding-card{background:linear-gradient(160deg,#fff,#eef5ff);box-shadow:0 36px 100px rgba(34,69,111,.2)}
.onboarding-card img{border-radius:24px;box-shadow:0 16px 38px rgba(30,122,225,.22)}
.onboarding-visual{border-radius:20px;background:radial-gradient(circle at center,rgba(41,207,255,.2),transparent 43%),linear-gradient(135deg,rgba(50,216,255,.07),rgba(155,92,255,.11))}

.boot-splash{background:radial-gradient(circle at 50% 35%,#19335e,#071225 52%,#040a14)}
.boot-splash img{border-radius:25px;box-shadow:0 20px 65px rgba(30,157,255,.34)}

@media(min-width:1040px){
  .app-header{left:var(--nav-width);padding-left:27px;padding-right:27px}
  .desktop-sidebar{
    width:var(--nav-width);
    padding:91px 14px 17px;
    background:linear-gradient(180deg,rgba(6,15,29,.98),rgba(9,20,38,.96));
    border-right:1px solid rgba(139,177,222,.14);
    box-shadow:14px 0 45px rgba(0,0,0,.08);
  }
  body.light .desktop-sidebar{background:linear-gradient(180deg,rgba(248,251,255,.98),rgba(241,246,252,.96));border-color:rgba(30,67,109,.09);box-shadow:14px 0 45px rgba(40,70,107,.05)}
  .desktop-sidebar nav{gap:4px}
  .nav-label{margin:11px 12px 7px;color:#647790;font-size:8px;font-weight:900;letter-spacing:.18em}
  .resource-label{margin-top:20px}
  .desktop-sidebar button{min-height:45px;gap:11px;padding:7px 10px;border-radius:14px;font-size:12px;font-weight:700;transition:.18s ease}
  .desktop-sidebar button span{display:grid;place-items:center;width:31px;height:31px;border:1px solid transparent;border-radius:11px;font-size:15px;transition:.18s ease}
  .desktop-sidebar button b{font-weight:750}
  .desktop-sidebar button:hover{color:var(--text);background:rgba(89,141,220,.06)}
  .desktop-sidebar button.active{color:var(--text);background:linear-gradient(90deg,rgba(45,190,225,.11),rgba(105,88,229,.09));box-shadow:inset 0 0 0 1px rgba(95,161,242,.08)}
  .desktop-sidebar button.active span{color:#fff;border-color:transparent;background:var(--brand-gradient);box-shadow:0 8px 20px rgba(59,109,228,.22)}
  .sidebar-footer{display:grid;gap:8px}
  .privacy-mini{display:flex;align-items:center;gap:10px;margin:0;padding:12px;border:1px solid rgba(63,198,148,.14);border-radius:15px;background:rgba(48,194,141,.045)}
  .privacy-mini>span{display:grid;place-items:center;width:27px;height:27px;border-radius:9px;background:rgba(55,200,146,.09);font-size:11px}
  .privacy-mini div{display:grid}
  .privacy-mini b{font-size:7px;letter-spacing:.12em;color:var(--good)}
  .privacy-mini small{margin-top:4px;color:var(--muted);font-size:9px}
  .sidebar-version{padding-left:12px;color:#52657d;font-size:7px;letter-spacing:.14em}
  .main-content{width:auto;min-width:0;margin-left:var(--nav-width);padding:104px 36px 48px;max-width:none}
  .preview-workspace{grid-template-columns:minmax(0,1fr) 350px}
  .code-editor-wrap{height:calc(100dvh - 335px);min-height:500px}
}

@media(min-width:1180px){
  .hero-grid{grid-template-columns:1.06fr .94fr;gap:clamp(42px,5vw,82px)}
  .hero-surface{padding-left:clamp(50px,5vw,78px);padding-right:clamp(46px,4.4vw,70px)}
}

@media(min-width:1400px){
  .main-content{padding-left:48px;padding-right:48px}
  .hero-surface{max-width:1460px;margin:0 auto}
  .sample-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media(min-width:640px) and (max-width:1179px){
  .hero-surface{grid-template-columns:1fr;min-height:auto}
  .hero-copy{max-width:820px;text-align:center;margin:0 auto}
  .hero-copy>p{margin-left:auto;margin-right:auto}
  .hero-actions,.hero-links,.hero-assurance{justify-content:center}
  .hero-visual{width:min(100%,660px);margin:0 auto}
  .steps-row{grid-template-columns:repeat(2,minmax(0,1fr));max-width:780px}
  .home-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:820px}
}

@media(max-width:820px){
  .header-context{display:none}
  .workflow-dock{justify-content:flex-start;overflow-x:auto;padding:7px;margin-bottom:24px;scrollbar-width:none}
  .workflow-dock::-webkit-scrollbar{display:none}
  .workflow-dock button{flex:0 0 auto;min-height:50px;padding:7px 10px}
  .workflow-dock>i{flex:0 0 18px;width:18px}
}

@media(max-width:639px){
  body::before{background-size:34px 34px;opacity:.12}
  .app-header{height:70px;padding-left:max(13px,env(safe-area-inset-left));padding-right:max(13px,env(safe-area-inset-right))}
  .brand{gap:9px}
  .brand img{width:40px;height:40px;border-radius:13px}
  .brand-copy b{font-size:10px;letter-spacing:.085em}
  .brand-copy small{display:block;font-size:8px;margin-top:5px}
  .header-actions{gap:6px}
  .icon-btn{width:40px;min-width:40px;height:40px;border-radius:13px}
  .status-chip{font-size:9px;padding:6px 8px}
  .main-content{padding:84px 13px calc(100px + env(safe-area-inset-bottom))}
  .hero-surface{min-height:auto;padding:28px 18px 24px;border-radius:28px}
  .hero-copy{text-align:left}
  .eyebrow{font-size:8px;padding:8px 10px}
  .hero-copy h1{font-size:clamp(38px,11.4vw,52px);margin:19px 0 17px;letter-spacing:-.055em}
  .hero-copy>p{font-size:14px;line-height:1.82}
  .hero-copy>p br{display:none}
  .hero-actions{display:grid;grid-template-columns:1fr;margin-top:24px}
  .hero-actions .btn{width:100%;min-width:0}
  .action-with-note{min-width:0!important}
  .hero-links{gap:8px 16px}
  .text-btn{font-size:10px}
  .hero-assurance{gap:9px 13px;margin-top:20px;font-size:9px}
  .hero-assurance b{width:17px;height:17px}
  .hero-visual{min-height:328px;margin-top:4px}
  .floating-chip{padding:7px 9px;font-size:7px}
  .chip-code{left:-2px;top:13%}
  .chip-live{right:-3px;bottom:13%}
  .visual-window{border-radius:22px;transform:perspective(1000px) rotateY(-2deg)}
  .visual-top{height:38px;padding:0 11px}
  .visual-top span{font-size:8px}
  .visual-body{grid-template-columns:1.08fr .92fr;gap:9px;padding:12px}
  .visual-code{min-height:218px;padding:14px 9px;border-radius:13px}
  .code-line{min-height:29px;font-size:9px}
  .code-line small{width:21px;font-size:7px}
  .code-line.dim{font-size:7px}
  .typing-line{margin-left:21px}
  .visual-phone{min-height:211px;border-width:5px;border-radius:27px;gap:7px}
  .phone-island{width:39px;height:9px;top:6px}
  .visual-phone .spark{font-size:32px}
  .visual-phone strong{font-size:14px}
  .visual-phone small{font-size:7px}
  .visual-phone .fake-button{padding:8px 10px;font-size:7px}
  .visual-status{min-height:32px;padding:0 12px;font-size:7px}
  .resume-project{grid-template-columns:auto 1fr;padding:13px 14px;margin-top:14px}
  .resume-project>i{display:none}
  .resume-icon{width:39px;height:39px;border-radius:13px}
  .section-intro{margin-top:54px;margin-bottom:20px}
  .section-intro h2{font-size:28px}
  .section-intro p{font-size:11px}
  .steps-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .step-card{min-height:198px;padding:20px 10px 17px;border-radius:20px}
  .step-card>b{font-size:8px}
  .step-icon{width:51px;height:51px;margin:15px auto 13px;border-radius:16px;font-size:17px}
  .step-card h2{font-size:15px}
  .step-card p{font-size:8px}
  .home-feature-grid{grid-template-columns:1fr;gap:9px}
  .feature-card{min-height:91px;padding:14px 15px;border-radius:18px}
  .feature-card>span{width:40px;height:40px}
  .privacy-banner{align-items:flex-start;padding:16px;border-radius:18px}
  .privacy-banner b{font-size:12px;line-height:1.45}
  .privacy-banner p{font-size:9px}
  .screen-heading{align-items:flex-start;margin:3px 0 20px}
  .screen-heading h1,.screen-heading.compact h1{font-size:34px}
  .screen-heading p{font-size:11px}
  .heading-actions{width:100%}
  .heading-actions .btn{flex:1;padding-left:9px;padding-right:9px;font-size:10px}
  .project-bar{align-items:stretch;padding:13px;border-radius:18px}
  .app-name-field input{padding:11px 12px;border-radius:12px}
  .mode-toggle{padding:9px 11px}
  .editor-toolbar,.preview-controls{margin-left:0;margin-right:0;border-left:1px solid rgba(133,170,216,.17);border-right:1px solid rgba(133,170,216,.17);border-radius:16px 16px 0 0}
  .editor-toolbar button,.preview-controls button,.segmented button{font-size:10px}
  .code-editor-wrap{margin-left:0;margin-right:0;height:56dvh;min-height:390px;grid-template-columns:47px minmax(0,1fr);border-left:1px solid rgba(133,170,216,.17);border-right:1px solid rgba(133,170,216,.17)}
  .line-numbers{padding-left:7px;padding-right:7px}
  .code-editor-wrap textarea{padding:16px 13px;font-size:13px}
  .editor-statusbar{margin-left:0;margin-right:0;padding:9px 10px;gap:9px;border-left:1px solid rgba(133,170,216,.17);border-right:1px solid rgba(133,170,216,.17);border-radius:0 0 16px 16px;font-size:9px}
  .mobile-editor-actions{bottom:calc(76px + env(safe-area-inset-bottom));padding-top:11px}
  .preview-controls{border-radius:16px;margin-bottom:13px}
  .preview-stage{max-width:100%;min-height:430px}
  .preview-stage.framed{border-width:7px;border-radius:31px}
  .console-panel{border-radius:18px}
  .save-summary{padding:16px;border-radius:20px}
  .save-summary img{width:62px;height:62px}
  .save-summary h2{font-size:18px}
  .export-card{min-height:0;padding:20px;border-radius:20px}
  .export-card p{min-height:0}
  .sample-card{border-radius:20px}
  .sample-preview{height:145px}
  .prompt-card,.guide-step,.settings-card{border-radius:19px}
  .instructor-screen{border-radius:25px}
  .instructor-bg{border-radius:25px}
  .instructor-content h1{font-size:37px}
  .bottom-nav{left:8px;right:8px}
  .toast-region{bottom:calc(91px + env(safe-area-inset-bottom))}
}

@media(max-width:360px){
  .brand-copy small{display:none}
  .brand-copy b{font-size:9px}
  .main-content{padding-left:10px;padding-right:10px}
  .hero-surface{padding-left:15px;padding-right:15px}
  .hero-copy h1{font-size:36px}
  .steps-row{grid-template-columns:1fr}
  .step-card{min-height:178px}
  .hero-assurance{display:grid;grid-template-columns:1fr 1fr}
  .visual-body{gap:6px;padding:9px}
  .visual-code{padding-left:7px;padding-right:7px}
}

@media(orientation:landscape) and (max-height:520px){
  .app-header{height:58px}
  .main-content{padding-top:69px}
  .hero-surface{padding:25px}
  .hero-visual{display:none}
  .workflow-dock{display:none!important}
  .code-editor-wrap{height:calc(100dvh - 190px);min-height:230px}
  .bottom-nav{bottom:5px}
}

@media(prefers-reduced-motion:reduce){
  .floating-chip,.typing-line::after{animation:none!important}
}

/* =========================================================
   v2.0.1 — Mobile layout stability and instructor mode fixes
   ========================================================= */

/* Prevent long content from widening the app on narrow devices. */
.screen,
.screen > *,
.card,
.sample-card,
.prompt-card,
.guide-step,
.settings-card,
.export-card,
.preview-workspace,
.preview-stage,
.console-panel,
.qr-card,
.instructor-content > *{min-width:0}

img,svg,canvas,iframe{max-width:100%}
.screen h1,.screen h2,.screen p,.screen strong,.screen small{overflow-wrap:anywhere}

/* Dark preview surfaces must keep readable colors even when the app theme is light. */
.preview-stage{
  --text:#f5f8ff;
  --muted:#a7b8cf;
  --cyan:#59ddff;
  color:#f5f8ff;
}
.preview-empty{color:#a7b8cf}
.preview-empty h2{color:#f5f8ff}
.preview-empty p{color:#a7b8cf}
.preview-stage .btn.primary{color:#fff}

.console-panel{color:#dce7f7}
.console-panel .console-entry{color:#dce7f7}
.console-panel .console-empty{color:#8ea2bd}

/* Give modal and sheet content a safe, scrollable area on short phones. */
.modal-backdrop,.sheet-backdrop{
  padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
}
.modal-card,.bottom-sheet,.onboarding-card{
  max-height:calc(100svh - max(20px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom)));
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

/* Full-screen preview remains reachable around notches and home indicators. */
.preview-stage.full-preview{
  width:100%!important;
  height:100svh!important;
  min-height:100svh!important;
}

/* Instructor mode is a dedicated presentation screen, not a normal app page. */
body[data-screen="instructor"]{
  background:#071225;
}
body[data-screen="instructor"] .app-header,
body[data-screen="instructor"] .desktop-sidebar,
body[data-screen="instructor"] .bottom-nav,
body[data-screen="instructor"] .workflow-dock{
  display:none!important;
}
body[data-screen="instructor"] .main-content{
  width:100%;
  max-width:none;
  min-height:100svh;
  margin:0!important;
  padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;
}
body[data-screen="instructor"] .instructor-screen{
  width:100%;
  min-height:calc(100svh - max(20px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom)));
  padding:clamp(14px,2.4vw,28px);
  border-radius:clamp(22px,3vw,34px);
  color:#f5f8ff;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
body[data-screen="instructor"] .instructor-bg{
  border-radius:inherit;
  border-color:rgba(130,190,255,.2);
}
body[data-screen="instructor"] .instructor-top{
  gap:12px;
}
body[data-screen="instructor"] .instructor-top .brand{
  min-width:0;
}
body[data-screen="instructor"] .instructor-top .brand b,
body[data-screen="instructor"] .instructor-content h1{
  color:#f5f8ff;
}
body[data-screen="instructor"] .instructor-top .brand small,
body[data-screen="instructor"] .instructor-content>div>p{
  color:#b9c8da;
}
body[data-screen="instructor"] .instructor-top .btn.secondary{
  flex:0 0 auto;
  color:#102038;
  background:#f4f7fb;
  border-color:rgba(255,255,255,.75);
  box-shadow:0 9px 28px rgba(0,0,0,.2);
}
body[data-screen="instructor"] .live-label{
  color:#66e5ff;
  border-color:rgba(102,229,255,.28);
  background:rgba(56,204,238,.1);
  box-shadow:none;
}
body[data-screen="instructor"] .instructor-content{
  grid-template-columns:minmax(0,1fr) minmax(280px,460px);
  min-height:calc(100svh - 122px);
  gap:clamp(20px,4vw,64px);
  padding:clamp(14px,3vh,34px) clamp(2px,1vw,12px) 8px;
}
body[data-screen="instructor"] .instructor-content h1{
  max-width:760px;
  margin:clamp(10px,2vh,20px) 0;
  font-size:clamp(38px,6vw,82px);
  line-height:1.02;
  text-shadow:0 10px 34px rgba(0,0,0,.28);
}
body[data-screen="instructor"] .instructor-content>div>p{
  max-width:660px;
  margin-bottom:0;
  line-height:1.65;
}
body[data-screen="instructor"] .instructor-steps{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  margin-top:clamp(14px,2.4vh,26px);
}
body[data-screen="instructor"] .instructor-steps span{
  min-width:0;
  padding:10px 11px;
  color:#eaf3ff;
  border-color:rgba(150,196,245,.18);
  background:rgba(255,255,255,.055);
  line-height:1.35;
}
body[data-screen="instructor"] .instructor-steps b{
  flex:0 0 27px;
  color:#66e5ff;
  background:rgba(50,216,255,.13);
}
body[data-screen="instructor"] .qr-card{
  width:min(100%,480px);
  padding:clamp(13px,2.2vw,23px);
  border-radius:clamp(22px,3vw,30px);
}
body[data-screen="instructor"] .qr-wrap{
  width:clamp(210px,70vmin,460px);
  max-width:100%;
  margin-bottom:10px;
  padding:clamp(8px,2vw,14px);
  border-radius:clamp(14px,2vw,19px);
}
body[data-screen="instructor"] .qr-card strong{
  display:block;
  max-width:100%;
  margin:10px 0 12px;
  padding:10px 13px;
  overflow:hidden;
  color:#102038;
  background:#eef3f9;
  border:1px solid #d8e2ee;
  border-radius:999px;
  font-size:clamp(11px,2.8vw,14px);
  white-space:nowrap;
  text-overflow:ellipsis;
}
body[data-screen="instructor"] .qr-card .button-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}
body[data-screen="instructor"] .qr-card .btn{
  min-width:0;
  min-height:42px;
  padding:8px 7px;
  font-size:clamp(10px,2.7vw,13px);
  white-space:nowrap;
}
body[data-screen="instructor"] .instructor-screen.instructor-fullscreen,
body[data-screen="instructor"] .instructor-screen:fullscreen{
  position:fixed;
  inset:0;
  z-index:1200;
  width:100vw;
  height:100svh;
  min-height:100svh;
  padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  border-radius:0;
  background:#071225;
}
body.instructor-fullscreen-open{overflow:hidden!important}

@media(max-width:639px){
  body[data-screen="instructor"] .main-content{padding:0!important}
  body[data-screen="instructor"] .instructor-screen{
    min-height:100svh;
    padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
    border-radius:0;
  }
  body[data-screen="instructor"] .instructor-bg{border-radius:0;border:0}
  body[data-screen="instructor"] .instructor-top .brand span{display:flex}
  body[data-screen="instructor"] .instructor-top .brand img{width:44px;height:44px}
  body[data-screen="instructor"] .instructor-top .brand b{font-size:9px;letter-spacing:.08em}
  body[data-screen="instructor"] .instructor-top .brand small{display:none}
  body[data-screen="instructor"] .instructor-top .btn.secondary{
    min-height:40px;
    padding:8px 11px;
    font-size:11px;
  }
  body[data-screen="instructor"] .instructor-content{
    display:flex;
    flex-direction:column;
    min-height:0;
    gap:16px;
    padding:20px 1px 2px;
  }
  body[data-screen="instructor"] .instructor-content>div:first-child{
    width:100%;
  }
  body[data-screen="instructor"] .instructor-content h1{
    margin:12px 0 9px;
    font-size:clamp(29px,9.4vw,39px);
    line-height:1.08;
  }
  body[data-screen="instructor"] .instructor-content>div>p{
    font-size:12px;
    line-height:1.55;
  }
  body[data-screen="instructor"] .instructor-steps{margin-top:13px;gap:6px}
  body[data-screen="instructor"] .instructor-steps span{
    flex-direction:column;
    align-items:flex-start;
    gap:5px;
    padding:8px;
    font-size:10px;
  }
  body[data-screen="instructor"] .instructor-steps b{
    width:25px;
    height:25px;
    flex-basis:25px;
  }
  body[data-screen="instructor"] .qr-card{width:min(100%,430px);padding:13px}
  body[data-screen="instructor"] .qr-wrap{width:clamp(205px,66vw,300px)}
  body[data-screen="instructor"] .qr-card strong{font-size:11px;padding:9px 11px}
}

@media(max-width:360px){
  body[data-screen="instructor"] .instructor-content{padding-top:14px;gap:12px}
  body[data-screen="instructor"] .live-label{padding:6px 9px;font-size:8px}
  body[data-screen="instructor"] .instructor-content h1{font-size:29px}
  body[data-screen="instructor"] .instructor-content>div>p{font-size:10px}
  body[data-screen="instructor"] .instructor-steps span{font-size:8px;padding:7px 6px}
  body[data-screen="instructor"] .qr-wrap{width:clamp(190px,64vw,230px)}
  body[data-screen="instructor"] .qr-card .btn{min-height:38px;font-size:9px}
}

@media(orientation:landscape) and (max-height:520px){
  body[data-screen="instructor"] .instructor-screen{
    min-height:100svh;
    padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  }
  body[data-screen="instructor"] .instructor-top .brand img{width:36px;height:36px}
  body[data-screen="instructor"] .instructor-top .btn.secondary{min-height:34px;padding:6px 10px}
  body[data-screen="instructor"] .instructor-content{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(245px,330px);
    align-items:center;
    min-height:calc(100svh - 52px);
    gap:16px;
    padding:4px 2px 0;
  }
  body[data-screen="instructor"] .live-label{padding:6px 9px;font-size:8px}
  body[data-screen="instructor"] .instructor-content h1{font-size:clamp(27px,5.2vw,48px);margin:8px 0}
  body[data-screen="instructor"] .instructor-content>div>p{display:none}
  body[data-screen="instructor"] .instructor-steps{margin-top:9px;gap:5px}
  body[data-screen="instructor"] .instructor-steps span{padding:6px;font-size:8px}
  body[data-screen="instructor"] .instructor-steps b{width:22px;height:22px;flex-basis:22px}
  body[data-screen="instructor"] .qr-card{padding:9px;border-radius:20px}
  body[data-screen="instructor"] .qr-wrap{width:min(48svh,250px);padding:7px;margin-bottom:5px}
  body[data-screen="instructor"] .qr-card strong{margin:5px 0 6px;padding:6px 9px;font-size:9px}
  body[data-screen="instructor"] .qr-card .btn{min-height:32px;padding:5px 4px;font-size:8px;border-radius:10px}
}

/* Always-available controls for the CSS full-screen preview. */
.preview-fullscreen-tools{
  display:none;
  position:absolute;
  z-index:20;
  top:max(10px,env(safe-area-inset-top));
  right:max(10px,env(safe-area-inset-right));
  gap:7px;
}
.preview-stage.full-preview .preview-fullscreen-tools{display:flex}
.preview-fullscreen-tools button{
  min-height:42px;
  padding:9px 13px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:13px;
  color:#fff;
  background:rgba(6,16,31,.84);
  box-shadow:0 12px 30px rgba(0,0,0,.3);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  touch-action:manipulation;
}
.preview-fullscreen-tools button:last-child{
  color:#ffdce1;
  background:rgba(130,25,42,.86);
}
@media(max-width:420px){
  .preview-fullscreen-tools{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));justify-content:space-between}
  .preview-fullscreen-tools button{min-height:40px;padding:8px 10px;font-size:11px}
}

/* Programmatic screen-reader focus must not draw a border around the entire page. */
.main-content:focus{outline:none}

@media(orientation:portrait) and (max-height:620px) and (max-width:639px){
  body[data-screen="instructor"] .instructor-top .brand img{width:38px;height:38px}
  body[data-screen="instructor"] .instructor-top .btn.secondary{min-height:36px;padding:6px 9px;font-size:10px}
  body[data-screen="instructor"] .instructor-content{padding-top:9px;gap:9px}
  body[data-screen="instructor"] .live-label{padding:5px 8px;font-size:7px}
  body[data-screen="instructor"] .instructor-content h1{margin:6px 0 5px;font-size:27px;line-height:1.03}
  body[data-screen="instructor"] .instructor-content>div>p{font-size:9px;line-height:1.35}
  body[data-screen="instructor"] .instructor-steps{margin-top:7px;gap:5px}
  body[data-screen="instructor"] .instructor-steps span{padding:5px 6px;font-size:7px}
  body[data-screen="instructor"] .instructor-steps b{width:21px;height:21px;flex-basis:21px}
  body[data-screen="instructor"] .qr-card{padding:9px;border-radius:19px}
  body[data-screen="instructor"] .qr-wrap{width:min(58vw,185px);padding:6px;margin-bottom:4px}
  body[data-screen="instructor"] .qr-card strong{margin:4px 0 5px;padding:6px 8px;font-size:8px}
  body[data-screen="instructor"] .qr-card .button-row{gap:5px}
  body[data-screen="instructor"] .qr-card .btn{min-height:33px;padding:4px 3px;font-size:7px;border-radius:9px}
}

/* Keep presentation mode inside one viewport; overflow scrolls inside the screen, never behind it. */
body[data-screen="instructor"]{overflow:hidden}
body[data-screen="instructor"] .app-shell,
body[data-screen="instructor"] .main-content{
  height:100svh;
  min-height:100svh;
  overflow:hidden;
}
body[data-screen="instructor"] .instructor-screen{
  height:100%;
  min-height:0;
}
@media(max-width:639px), (orientation:landscape) and (max-height:520px){
  body[data-screen="instructor"] .main-content{padding:0!important}
  body[data-screen="instructor"] .instructor-screen{height:100svh;min-height:100svh}
}

@keyframes deviceSpin{to{transform:rotate(360deg)}}

/* =========================================================
   v2.2 WORKSHOP EDITION — seminar reliability toolkit
   ========================================================= */
.workshop-pill{color:#7fe9ff;border-color:rgba(80,213,255,.28);background:rgba(60,190,255,.08)}
.rescue-pill{color:#ffd178;border-color:rgba(255,190,82,.28);background:rgba(255,174,52,.08)}
body.light .workshop-pill{color:#096d87;background:rgba(30,178,215,.1)}
body.light .rescue-pill{color:#8e5e00;background:rgba(244,174,51,.13)}
.workshop-feature{border-color:rgba(71,198,255,.28)!important;background:linear-gradient(145deg,rgba(42,168,220,.11),rgba(116,78,218,.08))!important}
.rescue-feature{border-color:rgba(255,180,72,.24)!important;background:linear-gradient(145deg,rgba(255,180,72,.09),rgba(255,101,120,.06))!important}

.workshop-hero{padding:clamp(20px,4vw,34px);overflow:hidden;position:relative;background:linear-gradient(135deg,rgba(22,135,181,.14),rgba(74,94,215,.10) 52%,rgba(128,76,205,.11))}
.workshop-hero::after{content:"";position:absolute;right:-90px;top:-100px;width:280px;height:280px;border-radius:50%;background:radial-gradient(circle,rgba(73,214,255,.16),transparent 68%);pointer-events:none}
.workshop-hero h2{font-size:clamp(25px,4vw,38px);margin:12px 0 10px;letter-spacing:-.035em}
.workshop-hero p{max-width:760px;color:var(--muted);line-height:1.75;margin-bottom:22px}
.workshop-route{display:flex;align-items:stretch;gap:8px;overflow-x:auto;padding:2px 1px 4px;scrollbar-width:none}
.workshop-route::-webkit-scrollbar{display:none}
.workshop-route>button{flex:1 0 154px;min-height:76px;display:flex;align-items:center;gap:11px;padding:12px;border:1px solid var(--line);border-radius:17px;background:rgba(255,255,255,.055);text-align:left;cursor:pointer}
body.light .workshop-route>button{background:rgba(255,255,255,.82)}
.workshop-route>button b{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(135deg,#13bddf,#526fe3);color:#fff}
.workshop-route>button:last-of-type b{background:linear-gradient(135deg,#f5a827,#e35571)}
.workshop-route>button span,.workshop-route>button small{display:block}.workshop-route>button span{font-weight:850}.workshop-route>button small{margin-top:3px;color:var(--muted);font-size:10px}.workshop-route>i{align-self:center;color:var(--muted);font-style:normal}

.workshop-grid{display:grid;grid-template-columns:1fr;gap:12px;margin:16px 0}
.workshop-action-card{padding:22px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(150deg,rgba(255,255,255,.055),rgba(255,255,255,.022));box-shadow:var(--shadow-sm)}
body.light .workshop-action-card{background:rgba(255,255,255,.9)}
.workshop-action-card h2{font-size:19px;margin:14px 0 7px}.workshop-action-card p{min-height:48px;color:var(--muted);font-size:13px;line-height:1.65}
.workshop-card-icon{width:52px;height:52px;display:grid;place-items:center;border-radius:17px;font-size:23px;font-weight:900;color:#fff;box-shadow:0 12px 30px rgba(30,91,167,.2)}
.workshop-card-icon.ok{background:linear-gradient(135deg,#11b985,#2e83dd)}.workshop-card-icon.ai{background:linear-gradient(135deg,#16c9e8,#6b5be7)}.workshop-card-icon.danger{background:linear-gradient(135deg,#f3ad28,#e65371)}
.workshop-panel{padding:20px;margin-top:14px}.workshop-panel .section-title-row{margin-bottom:13px}.workshop-panel .section-title-row small,.rescue-banner small,.prompt-builder-output .section-title-row small{display:block;color:var(--cyan);font-size:10px;letter-spacing:.12em;font-weight:850}.workshop-panel .section-title-row h2,.prompt-builder-output .section-title-row h2{margin:4px 0 0;font-size:19px}
.ai-link-grid{display:grid;grid-template-columns:1fr;gap:9px}.ai-link-card{min-height:68px;display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid var(--line);border-radius:16px;color:var(--text);text-decoration:none;background:rgba(255,255,255,.035)}body.light .ai-link-card{background:#fff}.ai-link-card>span{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;color:#fff;background:linear-gradient(135deg,#1cb9df,#6758da)}.ai-link-card b,.ai-link-card small{display:block}.ai-link-card small{color:var(--muted);font-size:11px;margin-top:3px}
.snippet-grid{display:grid;grid-template-columns:1fr;gap:8px}.snippet-card{position:relative;min-height:92px;padding:14px 76px 14px 14px;text-align:left;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.035);cursor:pointer}body.light .snippet-card{background:#fff}.snippet-card b,.snippet-card small{display:block}.snippet-card b{font-size:14px;margin-bottom:5px}.snippet-card small{color:var(--muted);line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.snippet-card>span{position:absolute;right:12px;top:50%;transform:translateY(-50%);padding:7px 9px;border-radius:9px;color:var(--cyan);font-size:11px;font-weight:850;background:rgba(65,195,238,.08)}
.workshop-memo{width:100%;min-height:130px;resize:vertical;margin-bottom:10px;padding:14px 15px;border:1px solid var(--line);border-radius:16px;background:rgba(4,13,27,.36);color:var(--text);line-height:1.7}body.light .workshop-memo{background:#f8fbff}

.device-check-summary{display:flex;align-items:center;gap:17px;padding:21px;margin-bottom:14px}.device-check-summary.ready{border-color:rgba(63,210,149,.34);background:linear-gradient(145deg,rgba(53,207,145,.10),rgba(36,113,190,.06))}.device-check-summary.attention{border-color:rgba(255,116,132,.3);background:linear-gradient(145deg,rgba(255,97,119,.08),rgba(255,183,77,.05))}.device-check-gauge{width:68px;height:68px;flex:0 0 68px;display:grid;place-items:center;border-radius:21px;background:linear-gradient(135deg,#264b78,#5565bb);box-shadow:inset 0 1px rgba(255,255,255,.15)}.device-check-summary.ready .device-check-gauge{background:linear-gradient(135deg,#16b783,#287ed5)}.device-check-summary.attention .device-check-gauge{background:linear-gradient(135deg,#e35d73,#e89b31)}.device-check-gauge span{font-size:30px;font-weight:950;color:#fff}.device-check-summary small{color:var(--cyan);font-weight:850;letter-spacing:.1em}.device-check-summary h2{font-size:21px;margin:4px 0 5px}.device-check-summary p{color:var(--muted);margin:0;line-height:1.55;font-size:13px}
.device-check-list{display:grid;grid-template-columns:1fr;gap:9px}.device-check-item{display:flex;gap:13px;padding:15px;border:1px solid var(--line);border-radius:17px;background:rgba(255,255,255,.033)}body.light .device-check-item{background:rgba(255,255,255,.88)}.device-check-item.ok{border-color:rgba(71,208,154,.22)}.device-check-item.warn{border-color:rgba(255,191,81,.26)}.device-check-item.error{border-color:rgba(255,103,124,.32);background:rgba(255,91,113,.055)}.check-state{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:11px;background:rgba(120,150,190,.13);font-weight:900}.device-check-item.ok .check-state{color:var(--good);background:rgba(70,210,154,.1)}.device-check-item.warn .check-state{color:var(--warn);background:rgba(255,196,94,.1)}.device-check-item.error .check-state{color:var(--danger);background:rgba(255,111,125,.1)}.device-check-item small{color:var(--muted);font-size:10px;letter-spacing:.05em}.device-check-item h3{margin:2px 0 4px;font-size:16px}.device-check-item p{margin:0;color:var(--muted);font-size:12px;line-height:1.55}.device-check-loading{grid-column:1/-1;min-height:130px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted)}.device-check-loading i{width:27px;height:27px;border:3px solid rgba(105,155,213,.18);border-top-color:var(--cyan);border-radius:50%;animation:deviceSpin .9s linear infinite}.device-next{padding:19px;margin-top:14px}.device-next h2{font-size:17px}

.prompt-builder-layout{display:grid;grid-template-columns:1fr;gap:14px}.prompt-builder-form,.prompt-builder-output,.repair-builder{padding:20px}.prompt-builder-form{display:grid;gap:13px}.prompt-builder-form label{display:grid;gap:7px;color:var(--muted);font-size:12px;font-weight:750}.prompt-builder-form label small{font-weight:500}.prompt-builder-form input,.prompt-builder-form textarea,.prompt-builder-form select,.repair-builder input{width:100%;min-height:48px;padding:11px 13px;border:1px solid var(--line);border-radius:13px;background:rgba(5,15,30,.34);color:var(--text);font-size:16px}.prompt-builder-form textarea{min-height:90px;resize:vertical;line-height:1.55}body.light .prompt-builder-form input,body.light .prompt-builder-form textarea,body.light .prompt-builder-form select,body.light .repair-builder input{background:#f7faff}.builder-code{min-height:330px;max-height:520px;overflow:auto;margin:14px 0;padding:16px;border-radius:16px;border:1px solid rgba(85,176,255,.16);background:#06101f;color:#d9e8fb;white-space:pre-wrap;word-break:break-word;font:12px/1.75 ui-monospace,SFMono-Regular,Menlo,monospace}.compact-code{min-height:150px;max-height:260px}.repair-builder{margin-top:14px}.repair-builder-row{display:grid;grid-template-columns:1fr;gap:8px;margin:12px 0}.repair-builder-row input{min-height:50px}.repair-builder .prompt-code{margin-bottom:10px}

.rescue-guide-grid{display:grid;grid-template-columns:1fr;gap:9px}.rescue-guide-card{display:flex;gap:13px;padding:15px;border:1px solid var(--line);border-radius:17px;background:rgba(255,255,255,.033)}body.light .rescue-guide-card{background:rgba(255,255,255,.9)}.rescue-guide-card>span{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(135deg,rgba(246,171,41,.18),rgba(229,79,109,.13));font-size:20px}.rescue-guide-card h2{font-size:15px;margin:1px 0 5px}.rescue-guide-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.55}.rescue-banner{display:flex;gap:15px;padding:21px;margin:15px 0;border-color:rgba(255,180,70,.27);background:linear-gradient(135deg,rgba(246,169,43,.10),rgba(229,77,111,.07))}.rescue-banner>span{font-size:34px}.rescue-banner h2{font-size:20px;margin:5px 0 6px}.rescue-banner p{color:var(--muted);margin:0;line-height:1.6}.emergency-sample-grid{display:grid;grid-template-columns:1fr;gap:11px}.emergency-sample-card{position:relative;overflow:hidden;padding:18px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,rgba(255,255,255,.05),rgba(255,255,255,.022));box-shadow:var(--shadow-sm)}body.light .emergency-sample-card{background:#fff}.emergency-sample-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(var(--sample-a),var(--sample-b))}.emergency-sample-head{display:flex;align-items:center;gap:11px}.emergency-sample-head>span{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;font-size:23px;background:linear-gradient(135deg,color-mix(in srgb,var(--sample-a) 22%,transparent),color-mix(in srgb,var(--sample-b) 18%,transparent))}.emergency-sample-head small{color:var(--good);font-size:9px;letter-spacing:.12em;font-weight:900}.emergency-sample-head h2{font-size:17px;margin:3px 0 0}.emergency-sample-card>p{color:var(--muted);font-size:12px;line-height:1.55;margin:12px 0}.emergency-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.emergency-actions .btn:last-child{grid-column:1/-1}.rescue-actions{padding:20px;margin-top:14px}.rescue-actions h2{font-size:18px}.rescue-action-grid{display:grid;grid-template-columns:1fr;gap:8px}

@media(min-width:640px){
  .workshop-grid{grid-template-columns:repeat(3,1fr)}
  .ai-link-grid{grid-template-columns:repeat(2,1fr)}
  .snippet-grid{grid-template-columns:repeat(2,1fr)}
  .device-check-list{grid-template-columns:repeat(2,1fr)}
  .prompt-builder-layout{grid-template-columns:minmax(300px,.78fr) minmax(0,1.22fr)}
  .repair-builder-row{grid-template-columns:1fr auto}
  .rescue-guide-grid{grid-template-columns:repeat(2,1fr)}
  .emergency-sample-grid{grid-template-columns:repeat(2,1fr)}
  .rescue-action-grid{grid-template-columns:repeat(2,1fr)}
}
@media(min-width:1100px){.emergency-sample-grid{grid-template-columns:repeat(3,1fr)}.ai-link-grid{grid-template-columns:repeat(4,1fr)}.device-check-list{grid-template-columns:repeat(3,1fr)}}
@media(max-width:639px){
  .workshop-hero{padding:18px}.workshop-route{margin-right:-18px;padding-right:18px}.workshop-action-card{padding:18px}.workshop-panel{padding:16px}
  .device-check-summary{align-items:flex-start;padding:17px}.device-check-gauge{width:56px;height:56px;flex-basis:56px;border-radius:17px}.device-check-gauge span{font-size:25px}.device-check-summary h2{font-size:18px}
  .prompt-builder-form,.prompt-builder-output,.repair-builder{padding:16px}.builder-code{min-height:280px}.rescue-banner{padding:17px}.emergency-sample-card{padding:16px}.emergency-actions{grid-template-columns:1fr}.emergency-actions .btn:last-child{grid-column:auto}
}
@media(max-width:360px){.workshop-route>button{flex-basis:138px}.snippet-card{padding-right:14px}.snippet-card>span{position:static;display:inline-block;transform:none;margin-top:8px}.device-check-summary{display:grid;grid-template-columns:auto 1fr;gap:12px}}
@media(min-width:1040px){
  .desktop-sidebar nav{min-height:0;overflow-y:auto;padding-right:3px;padding-bottom:8px}
  .desktop-sidebar{overflow:hidden}
  .sidebar-footer{flex:0 0 auto}
}
@media(max-width:639px){
  .workshop-route{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;margin-right:0;padding-right:0}
  .workshop-route>i{display:none}
  .workshop-route>button{min-width:0;flex:auto}
}

/* =========================================================
   v2.2 WORKSHOP RELIABILITY — clarity, recovery, accessibility
   ========================================================= */
button,[role="button"],summary{min-height:44px}
.editor-toolbar button,.preview-controls button,.segmented button,.console-footer button,.project-bar button,.chip-row button,.repair-item button,body[data-screen="instructor"] .instructor-screen button{min-width:44px;min-height:44px}
.btn.tiny,body[data-screen="instructor"] .instructor-screen button{min-height:44px!important}
button:disabled,.btn:disabled{cursor:not-allowed;opacity:.5;filter:saturate(.55);transform:none!important}
body.preview-fullscreen-open,body.instructor-fullscreen-open{overflow:hidden!important}

.workshop-next{position:relative;z-index:1}
.workshop-progress-label{display:inline-flex;margin-left:8px;padding:7px 10px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:11px;font-weight:850;letter-spacing:.06em;background:rgba(255,255,255,.045)}
.workshop-next>.btn{margin-bottom:22px}
.workshop-route>button{position:relative}
.workshop-route>button.current{border-color:rgba(49,199,240,.55);box-shadow:0 0 0 3px rgba(45,192,235,.11);background:linear-gradient(145deg,rgba(41,185,224,.14),rgba(93,81,214,.1))}
.workshop-route>button.complete b{background:linear-gradient(135deg,#0ea97a,#287ccb)}
.workshop-route>button.rescue-route{border-color:rgba(244,168,50,.3);background:linear-gradient(145deg,rgba(244,168,50,.1),rgba(224,79,109,.07))}
.workshop-route>button.rescue-route b{background:linear-gradient(135deg,#f5a827,#e35571)}

.prompt-principles{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}
.prompt-principles span{padding:7px 10px;border:1px solid rgba(59,181,226,.22);border-radius:999px;color:var(--cyan);background:rgba(50,190,230,.07);font-size:11px;font-weight:800}

.rescue-question{padding:clamp(17px,3vw,24px)}
.rescue-question>div:first-child small,.rescue-answer>small{display:block;color:var(--cyan);font-size:10px;letter-spacing:.12em;font-weight:900}
.rescue-question>div:first-child h2{margin:5px 0 6px;font-size:clamp(22px,4vw,30px)}
.rescue-question>div:first-child p{margin-bottom:15px;color:var(--muted)}
.rescue-guide-card{width:100%;align-items:center;color:var(--text);text-align:left;cursor:pointer}
.rescue-guide-card h3{font-size:15px;margin:1px 0 5px}
.rescue-guide-card>div{flex:1;min-width:0}
.rescue-guide-card>i{font-style:normal;color:var(--muted);font-size:18px}
.rescue-guide-card.active{border-color:rgba(244,168,50,.48);box-shadow:0 0 0 3px rgba(244,168,50,.1)}
.rescue-answer{margin-top:14px;padding:18px;border:1px solid rgba(244,168,50,.28);border-radius:18px;background:linear-gradient(145deg,rgba(244,168,50,.09),rgba(224,79,109,.055))}
.rescue-answer h2{margin:5px 0 10px;font-size:20px}
.rescue-answer ol{margin:0 0 16px;padding-left:22px;color:var(--muted);line-height:1.8}
.rescue-answer li::marker{color:var(--cyan);font-weight:900}

.manual-copy-area{display:block;width:100%;min-height:220px;max-height:50dvh;resize:vertical;padding:13px;border:1px solid var(--line);border-radius:13px;background:#06101f;color:#e7f1ff;font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace}
.device-check-item.neutral{border-color:rgba(103,143,193,.2)}

@media(max-width:639px){
  .screen-heading p{font-size:13px;line-height:1.6}
  .text-btn{font-size:12px}
  .hero-assurance{font-size:11px}
  .step-card p{font-size:11px;line-height:1.45}
  .feature-card small{font-size:12px;line-height:1.5}
  .privacy-banner p{font-size:11px;line-height:1.55}
  .editor-toolbar button,.preview-controls button,.segmented button{font-size:12px}
  .editor-statusbar{font-size:11px}
  .bottom-nav button{font-size:11px}
  .app-name-field{font-size:11px}
  .workshop-progress-label{margin:8px 0 0}
  .workshop-next>.btn{width:100%}
  .rescue-question{padding:16px}
}
