#kks-home-shell {
  --portal-ink: #f7f0ff;
  --portal-copy: #c9b8d7;
  --portal-muted: #9c89ac;
  --portal-line: rgba(220, 190, 255, .15);
  --portal-panel: rgba(23, 16, 32, .82);
  --portal-violet: #ba8aff;
  --portal-coral: #ff829c;
  position: relative;
  z-index: 20;
  min-height: 100vh;
  color: var(--portal-ink);
  font-family: 'DM Sans', 'Padauk', 'Segoe UI', sans-serif;
}

body.kks-portal-home #root { display: none !important; }
body.kks-show-studio #kks-home-shell { display: none !important; }
body.kks-portal-home #kks-home-shell { display: block; }
body.kks-portal-home #dubflow-announcement-bar {
  padding: 8px 14px !important;
  border-bottom: 1px solid rgba(220, 190, 255, .13) !important;
  color: #d9c8e8 !important;
  background: linear-gradient(90deg, rgba(48, 30, 67, .92), rgba(27, 17, 39, .96)) !important;
  font: 500 11px/1.5 'DM Sans', 'Padauk', 'Segoe UI', sans-serif !important;
  text-align: center !important;
}

.portal-page {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 82% 9%, rgba(196, 92, 255, .15), transparent 30rem),
    radial-gradient(ellipse at 7% 56%, rgba(255, 100, 130, .08), transparent 31rem),
    linear-gradient(145deg, #0b0711, #100a18 54%, #0a0810);
}
.portal-container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.portal-header {
  position: relative;
  z-index: 2;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(220, 190, 255, .09);
}
.portal-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--portal-ink); text-decoration: none; }
.portal-brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  color: #1a1025; font: 800 17px 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, #c59aff, #ff809d);
  box-shadow: 0 7px 24px rgba(185, 112, 255, .22);
}
.portal-brand-name { display: block; font: 700 14px 'Space Grotesk', 'Padauk', sans-serif; letter-spacing: -.025em; }
.portal-brand-caption { display: block; margin-top: 2px; color: var(--portal-muted); font: 600 9px 'JetBrains Mono', 'Padauk', monospace; letter-spacing: .12em; }
.portal-nav { display: flex; align-items: center; gap: 27px; }
.portal-nav a { color: var(--portal-copy); text-decoration: none; font-size: 12px; font-weight: 600; transition: color .18s ease; }
.portal-nav a:hover { color: var(--portal-ink); }
.portal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.portal-lang {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--portal-line); border-radius: 9px; background: rgba(12, 8, 18, .72);
}
.portal-lang button {
  min-height: 32px; padding: 0 10px; border: 0; border-radius: 6px; cursor: pointer;
  color: var(--portal-muted); background: transparent; font: 700 10px 'DM Sans', 'Padauk', sans-serif;
}
.portal-lang button[aria-pressed="true"] { color: #fff; background: rgba(169, 119, 255, .23); }
.portal-button {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 0 17px; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  font: 700 12px 'DM Sans', 'Padauk', sans-serif; text-decoration: none; transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}
.portal-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.portal-button-primary { color: #1a1025; background: linear-gradient(105deg, #bd8aff, #ff829c); box-shadow: 0 10px 28px rgba(178, 104, 255, .18); }
.portal-button-quiet { color: var(--portal-ink); border-color: var(--portal-line); background: rgba(23, 16, 32, .5); }
.portal-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .75fr); align-items: center; gap: clamp(38px, 8vw, 110px); padding: clamp(76px, 10vw, 128px) 0 104px; }
.portal-hero::before {
  content: ''; position: absolute; z-index: 0; right: -190px; top: 50px; width: 520px; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(217, 255, 88, .16); box-shadow: 0 0 0 35px rgba(217, 255, 88, .025), 0 0 0 90px rgba(195, 154, 255, .025), inset 0 0 90px rgba(196, 92, 255, .11);
  pointer-events: none;
}
.portal-hero-copy, .portal-preview { position: relative; z-index: 1; }
.portal-eyebrow { display: flex; align-items: center; gap: 9px; color: #d7bcff; font: 700 10px 'JetBrains Mono', 'Padauk', monospace; letter-spacing: .14em; }
.portal-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #d9ff58; box-shadow: 0 0 14px rgba(217, 255, 88, .6); }
.portal-hero h1 {
  max-width: 700px; margin: 22px 0 18px; color: var(--portal-ink);
  font: 700 clamp(46px, 6.5vw, 78px)/1.02 'Space Grotesk', 'Padauk', 'Segoe UI', sans-serif;
  letter-spacing: -.065em;
}
.portal-hero h1 span { color: #c99aff; }
.portal-lead { max-width: 545px; margin: 0; color: var(--portal-copy); font-size: clamp(15px, 1.45vw, 17px); line-height: 1.75; }
.portal-hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 29px; }
.portal-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 29px; color: var(--portal-muted); font: 600 10px 'JetBrains Mono', 'Padauk', monospace; }
.portal-trust span { display: inline-flex; align-items: center; gap: 7px; }
.portal-trust span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #83e8ae; }
.portal-preview {
  min-height: 390px; padding: 24px; overflow: hidden; border: 1px solid rgba(220, 190, 255, .18); border-radius: 17px;
  background: linear-gradient(150deg, rgba(38, 25, 52, .94), rgba(17, 11, 25, .97));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .045);
}
.portal-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--portal-line); }
.portal-preview-title { color: var(--portal-ink); font-size: 12px; font-weight: 700; }
.portal-live { display: inline-flex; align-items: center; gap: 7px; color: #a9edc3; font: 700 9px 'JetBrains Mono', 'Padauk', monospace; }
.portal-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #83e8ae; box-shadow: 0 0 12px rgba(131, 232, 174, .45); }
.portal-wave { height: 116px; display: flex; align-items: center; justify-content: center; gap: 5px; margin: 20px 0; border: 1px solid rgba(220, 190, 255, .09); border-radius: 10px; background: radial-gradient(ellipse, rgba(169, 119, 255, .12), transparent 68%), #100a18; }
.portal-wave i { width: 4px; height: var(--wave-height); border-radius: 5px; background: linear-gradient(180deg, #d6b7ff, #a977ff 62%, #ff829c); opacity: .8; }
.portal-flow { display: grid; gap: 10px; }
.portal-flow-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid rgba(220, 190, 255, .1); border-radius: 9px; background: rgba(12, 8, 18, .44); }
.portal-flow-number { color: #d2b1ff; font: 700 10px 'JetBrains Mono', monospace; }
.portal-flow-label { color: var(--portal-ink); font-size: 11px; font-weight: 700; }
.portal-flow-detail { margin-top: 3px; color: var(--portal-muted); font-size: 10px; }
.portal-flow-check { color: #d9ff58; font: 700 10px 'JetBrains Mono', monospace; }
.portal-section { padding: 76px 0; border-top: 1px solid rgba(220, 190, 255, .09); }
.portal-section-heading { max-width: 690px; margin: 0 auto 34px; text-align: center; }
.portal-section-heading .portal-eyebrow { justify-content: center; }
.portal-section-heading h2 { margin: 15px 0 10px; color: var(--portal-ink); font: 700 clamp(29px, 4vw, 43px)/1.12 'Space Grotesk', 'Padauk', sans-serif; letter-spacing: -.045em; }
.portal-section-heading p { margin: 0; color: var(--portal-copy); font-size: 14px; line-height: 1.7; }
.portal-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.portal-feature {
  min-height: 168px; padding: 21px; border: 1px solid var(--portal-line); border-radius: 11px;
  background: linear-gradient(145deg, rgba(29, 19, 40, .78), rgba(17, 11, 25, .7));
}
.portal-feature-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #d3b1ff; background: rgba(169, 119, 255, .13); font: 700 12px 'JetBrains Mono', monospace; }
.portal-feature h3 { margin: 17px 0 7px; color: var(--portal-ink); font-size: 14px; font-weight: 700; }
.portal-feature p { margin: 0; color: var(--portal-muted); font-size: 12px; line-height: 1.65; }
.portal-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.portal-step { padding: 20px; border-top: 1px solid rgba(195, 154, 255, .42); background: rgba(23, 16, 32, .48); }
.portal-step-number { color: #c79aff; font: 700 10px 'JetBrains Mono', monospace; letter-spacing: .1em; }
.portal-step h3 { margin: 13px 0 7px; color: var(--portal-ink); font-size: 14px; }
.portal-step p { margin: 0; color: var(--portal-muted); font-size: 12px; line-height: 1.65; }
.portal-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 20px 0 70px; padding: 28px;
  border: 1px solid rgba(195, 154, 255, .22); border-radius: 13px;
  background: radial-gradient(ellipse at 90% 0, rgba(255, 100, 130, .12), transparent 35%), linear-gradient(110deg, rgba(169, 119, 255, .12), rgba(32, 20, 43, .76));
}
.portal-cta h2 { margin: 0 0 7px; color: var(--portal-ink); font: 700 clamp(21px, 3vw, 30px) 'Space Grotesk', 'Padauk', sans-serif; letter-spacing: -.035em; }
.portal-cta p { margin: 0; color: var(--portal-copy); font-size: 12px; line-height: 1.6; }
.portal-footer { display: flex; justify-content: space-between; gap: 15px; padding: 20px 0 28px; border-top: 1px solid rgba(220, 190, 255, .09); color: var(--portal-muted); font: 10px 'JetBrains Mono', 'Padauk', monospace; }
.portal-footer a { color: #c6a0f4; text-decoration: none; }
.portal-footer a:hover { color: var(--portal-ink); }
.portal-studio-tools {
  position: fixed; z-index: 1200; right: 16px; bottom: 16px; display: none; align-items: center; gap: 7px;
  padding: 5px; border: 1px solid rgba(220, 190, 255, .2); border-radius: 10px; background: rgba(16, 10, 24, .93);
  box-shadow: 0 9px 30px rgba(0, 0, 0, .35); backdrop-filter: blur(14px);
}
body.kks-show-studio .portal-studio-tools { display: flex; }
.portal-studio-tools .portal-button { min-height: 34px; padding: 0 11px; font-size: 10px; }
.portal-studio-tools .portal-lang button { min-height: 28px; }
body.kks-auth-view .portal-studio-tools { top: 60px; right: 12px; bottom: auto; }
.portal-lang button:focus-visible, .portal-button:focus-visible, .portal-nav a:focus-visible { outline: 2px solid #d6b7ff; outline-offset: 3px; }
html[data-ui-language="my"] #root > div.min-h-screen:not([class*="md:flex-row"])::before {
  content: 'KKS AI\A \A ဇာတ်လမ်းတိုင်းအတွက်။\A အသံသစ်တစ်ခုစီ။' !important;
}

@media (max-width: 900px) {
  .portal-hero { grid-template-columns: minmax(0, 1fr) minmax(290px, .78fr); gap: 30px; }
  .portal-nav { gap: 16px; }
  .portal-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  body.kks-portal-home #dubflow-announcement-bar { padding: 7px 12px !important; font-size: 10px !important; }
  .portal-container { width: min(100% - 32px, 560px); }
  .portal-header { min-height: 66px; gap: 12px; }
  .portal-nav { display: none; }
  .portal-brand-caption { font-size: 8px; }
  .portal-actions { gap: 7px; }
  .portal-actions > .portal-button { min-height: 36px; padding: 0 10px; font-size: 10px; }
  .portal-lang button { min-height: 30px; padding: 0 8px; font-size: 9px; }
  .portal-hero { grid-template-columns: 1fr; gap: 33px; padding: 62px 0 66px; }
  .portal-hero h1 { max-width: 560px; margin-top: 17px; font-size: clamp(42px, 12vw, 62px); }
  .portal-lead { font-size: 14px; }
  .portal-hero-actions { margin-top: 23px; }
  .portal-preview { min-height: auto; padding: 17px; }
  .portal-preview::after { width: 300px; }
  .portal-wave { height: 86px; margin: 14px 0; gap: 4px; }
  .portal-wave i { width: 3px; }
  .portal-section { padding: 57px 0; }
  .portal-section-heading { margin-bottom: 24px; text-align: left; }
  .portal-section-heading .portal-eyebrow { justify-content: flex-start; }
  .portal-section-heading p { font-size: 13px; }
  .portal-feature-grid { grid-template-columns: 1fr; gap: 9px; }
  .portal-feature { min-height: 0; padding: 17px; }
  .portal-feature h3 { margin-top: 12px; }
  .portal-steps { grid-template-columns: 1fr; gap: 9px; }
  .portal-step { padding: 17px; }
  .portal-cta { align-items: flex-start; flex-direction: column; margin: 14px 0 48px; padding: 21px; }
  .portal-footer { flex-direction: column; }
  .portal-studio-tools { right: 10px; bottom: 10px; }
  body.kks-auth-view .portal-studio-tools { top: 59px; right: 10px; bottom: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-button { transition: none; }
  html:focus-within { scroll-behavior: auto; }
}
