:root {
  --bg-dark: #050914;
  --panel-bg: #101827;
  --panel-soft: #142036;
  --yellow: #facc15;
  --red: #ef4444;
  --text-light: #f3f4f6;
  --text-muted: #9ca3af;
  --accent-blue: #13bdf5;
  --accent-blue-2: #2563eb;
  --green: #10b981;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  padding: 18px;
  background:
    radial-gradient(circle at 50% -20%, rgba(19,189,245,.16), transparent 42%),
    var(--bg-dark);
  color: var(--text-light);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { touch-action: manipulation; }

.app-container {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 4px 0 8px;
}
.brand-logo {
  width: 92px;
  height: 92px;
  object-fit: cover;
  object-position: center 31%;
  border-radius: 24px;
  box-shadow: 0 0 28px rgba(19,189,245,.28);
}
.brand-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: .95;
  letter-spacing: -2px;
}
.brand-copy p {
  margin: 7px 0 0;
  color: var(--accent-blue);
  font-weight: 700;
  letter-spacing: .04em;
}

.sf-meter-container {
  background: #03050a;
  border: 2px solid #344258;
  padding: 10px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(19,189,245,.08);
  cursor: pointer;
}
.sf-label {
  color: var(--accent-blue);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: 1.5px;
  margin-bottom: 7px;
}
.sf-bar-outer {
  background: #263246;
  height: 25px;
  border: 1px solid #64748b;
  position: relative;
  border-radius: 999px;
  overflow: hidden;
}
.sf-bar-inner {
  background: linear-gradient(90deg, #ef4444 0%, #facc15 32%, #10b981 68%, #13bdf5 100%);
  height: 100%;
  transition: width .3s ease;
}
.sf-bar-inner.low { filter: saturate(1.2); }
.sf-percentage {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 4px #000;
}
.sf-sub-label {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 5px;
  letter-spacing: 1px;
}

.main-headline {
  margin: 0;
  text-align: center;
  font-size: clamp(1rem, 3.8vw, 1.3rem);
  font-weight: 600;
  color: #dbeafe;
  padding: 4px 6px;
}

.mode-tabs {
  display: flex;
  width: min(520px, 100%);
  margin: 0 auto;
  background: #0b1220;
  border: 1px solid #29364c;
  border-radius: 999px;
  padding: 5px;
}
.mode-tab {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: #aebbd0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}
.mode-tab.active {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: white;
  box-shadow: 0 5px 18px rgba(37,99,235,.28);
}

.matrix-grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 18px;
  min-height: 430px;
}
.panel {
  background: rgba(16,24,39,.92);
  border: 1px solid #2d3b52;
  border-radius: 18px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Only the selected conversation mode is shown. */
.matrix-grid { grid-template-columns: 1fr; }
.panel { display: none; min-height: 430px; }
.panel.mode-active { display: flex; }
.panel-header {
  font-weight: 800;
  border-bottom: 1px solid #26344a;
  padding: 2px 4px 11px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-indicator.checked { color: var(--green); }

.chat-stream {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 390px;
  padding: 2px 4px 8px;
}
.msg {
  padding: 10px 13px;
  border-radius: 14px;
  max-width: 88%;
  font-size: .96rem;
  line-height: 1.45;
  word-break: break-word;
}
.msg.system {
  background: #1c283b;
  color: #bac5d4;
  align-self: center;
  text-align: center;
}
.msg.user {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg.bot-classic {
  background: #27364c;
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg.bot-comic {
  background: #fff;
  color: #07111f;
  font-weight: 750;
  border: 3px solid #07111f;
  border-radius: 18px;
  align-self: flex-start;
  position: relative;
  box-shadow: 4px 4px 0 #07111f;
  padding: 12px 14px;
}


.robot-stream {
  width: min(680px, 98%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
}
.robot-bubble {
  padding: 10px 13px;
  border-radius: 16px;
  line-height: 1.4;
  font-size: .95rem;
}
.robot-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.robot-bubble.bot {
  align-self: flex-start;
  background: #fff;
  color: #07111f;
  border: 3px solid #07111f;
  box-shadow: 4px 4px 0 #07111f;
  font-weight: 750;
  border-bottom-left-radius: 4px;
}
.robot-bubble.system {
  align-self: center;
  background: #18263a;
  color: #bcd1e7;
}

.robot-panel {
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(19,189,245,.13), transparent 46%),
    #0b1322;
  border-style: dashed;
}
.robot-panel.live-active {
  border-style: solid;
  border-color: var(--accent-blue);
  box-shadow: inset 0 0 36px rgba(19,189,245,.07), 0 0 20px rgba(19,189,245,.14);
}
.robot-companion-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.robot-hero-wrap {
  width: min(760px, 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.robot-live-balloon {
  position: relative;
  width: min(320px, 90vw);
  min-height: 132px;
  padding: 16px 18px;
  background: #ffffff;
  color: #07111f;
  border: 4px solid #07111f;
  border-radius: 28px;
  box-shadow: 6px 6px 0 #07111f;
  text-align: left;
  font-weight: 800;
  line-height: 1.45;
  opacity: .95;
}
.robot-live-balloon::after {
  content: '';
  position: absolute;
  right: -18px;
  top: 72px;
  width: 28px;
  height: 28px;
  background: #ffffff;
  border-right: 4px solid #07111f;
  border-bottom: 4px solid #07111f;
  transform: rotate(-35deg) skewX(8deg);
}
.robot-live-balloon::before {
  content: 'OPENKYAI SPEAKING';
  display: block;
  margin-bottom: 9px;
  font-size: .72rem;
  letter-spacing: .12em;
  color: #0ea5e9;
  font-weight: 900;
}
.robot-live-balloon-text {
  min-height: 3.6em;
}
.robot-live-balloon.visible {
  animation: balloonPulse 1.6s ease-in-out infinite;
}
@keyframes balloonPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.robot-stage {
  width: min(330px, 90%);
  aspect-ratio: 1 / 1;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 0 42px rgba(19,189,245,.22);
  background: #02050b;
  position: relative;
  transform-origin: 50% 72%;
  animation: robotIdleFloat 4.8s ease-in-out infinite;
}
.robot-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes robotIdleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  35% { transform: translateY(-3px) rotate(-.35deg); }
  70% { transform: translateY(1px) rotate(.3deg); }
}
.robot-mouth-mask {
  position: absolute;
  left: 50%;
  top: 33.1%;
  width: 21%;
  height: 5.2%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #050b13;
  box-shadow: inset 0 0 8px rgba(0,0,0,.9), 0 0 5px rgba(5,11,19,.85);
  pointer-events: none;
}

.robot-name {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: .04em;
  color: #dff7ff;
  text-shadow: 0 0 14px rgba(19,189,245,.45);
}

.voice-bar {
  border-radius: 999px;
  background: #071222;
  border: 1px solid #17486a;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(0,208,255,.14);
}
.robot-face-mouth {
  position: absolute;
  left: 50%;
  top: 33.1%;
  width: 18%;
  height: 2.5%;
  min-height: 6px;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
}
.voice-bar span {
  display: block;
  width: 29%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #00d8ff 20%, #e0fbff 52%, #67e8f9 78%, transparent);
  opacity: .45;
  box-shadow: 0 0 8px #00d8ff;
}
.voice-bar.talking span { animation: kittScan .58s ease-in-out infinite alternate; opacity: 1; }
@keyframes kittScan {
  from { transform: translateX(-100%); }
  to { transform: translateX(345%); }
}
.robot-panel.voice-active .robot-stage {
  animation: robotTalking 1.15s ease-in-out infinite;
}
@keyframes robotTalking {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  35% { transform: translateY(-2px) rotate(-.35deg) scale(1.004); }
  70% { transform: translateY(1px) rotate(.3deg) scale(1.002); }
}
.robot-cta {
  font-size: .88rem;
  color: #9edfff;
  font-weight: 700;
  padding: 0 10px;
  min-height: 1.4em;
}

.input-container { display: flex; gap: 10px; }
.input-container input {
  flex: 1;
  min-width: 0;
  background: #111c2e;
  border: 1px solid #33455f;
  padding: 13px 14px;
  color: #fff;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
}
.input-container input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(19,189,245,.12); }
.input-container input:disabled { background: #0a0e16; cursor: not-allowed; border-color: var(--red); }
.input-container button {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: none;
  padding: 0 22px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
}
.input-container button:disabled { background: #374151; cursor: not-allowed; }
.demo-note {
  margin: -4px 4px 0;
  text-align: center;
  font-size: .78rem;
  color: #738198;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.86);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 100;
  padding: 16px;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: #0f1726;
  border: 2px solid #1aaee8;
  padding: 26px;
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 0 45px rgba(19,189,245,.18);
}
.modal-box h2 { margin-top: 0; }
.modal-sub { color: #a5e6ff; font-size: 1.05rem; font-weight: 800; }
.pricing-matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.price-card {
  background: #19253a;
  border: 1px solid #33455f;
  padding: 16px 12px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-card.popular { border-color: var(--accent-blue); box-shadow: 0 0 18px rgba(19,189,245,.13); }
.price-card h3 { margin: 0; }
.price-card .price { font-size: 1.42rem; font-weight: 900; color: #7ddcff; }
.price-card .price span { font-size: .78rem; color: var(--text-muted); }
.price-card p { font-size: .78rem; color: #aab6c7; flex: 1; }
.plan-btn, .close-modal-btn { border: 0; border-radius: 10px; font-weight: 800; cursor: pointer; }
.plan-btn { padding: 9px; margin-top: 4px; }
.plan-btn.disabled { background: #3d4858; color: #9ca3af; cursor: not-allowed; }
.plan-btn.action { background: var(--green); color: #fff; }
.close-modal-btn { background: #25344b; color: #fff; padding: 11px 20px; }

@media (max-width: 800px) {
  .robot-hero-wrap { gap: 14px; }
  .robot-live-balloon { width: min(520px, 94vw); min-height: 110px; }
  .robot-live-balloon::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -17px;
    border-right: 4px solid #07111f;
    border-bottom: 4px solid #07111f;
    transform: translateX(-50%) rotate(55deg) skewX(8deg);
  }
  body { padding: 12px; }
  .brand-header { justify-content: flex-start; }
  .brand-logo { width: 74px; height: 74px; border-radius: 20px; }
  .matrix-grid { grid-template-columns: 1fr; min-height: 0; }
  .robot-stage { width: min(285px, 86vw); }
  .pricing-matrix { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 470px) {
  .robot-live-balloon { padding: 14px 14px; border-radius: 22px; }
  .brand-copy h1 { font-size: 2.15rem; }
  .brand-logo { width: 66px; height: 66px; }
  .mode-tabs { width: 100%; }
  .input-container { gap: 7px; }
  .input-container button { padding: 0 16px; }
  .pricing-matrix { grid-template-columns: 1fr; }
  .modal-box { padding: 20px 14px; }
}

/* Expressive Robot Mode voice state */
.robot-panel.voice-active .robot-stage {
  filter: saturate(1.08) brightness(1.04);
}
.robot-panel.voice-active .robot-shell {
  animation-duration: 1.5s;
}

@media (prefers-reduced-motion: reduce) {
  .robot-stage,
  .robot-panel.voice-active .robot-stage,
  .voice-bar.talking span { animation: none !important; }
}

/* PayPal membership controls: additive styles, original robot/chat styles unchanged. */
.billing-account{border-top:1px solid #33455f;padding:14px 4px 8px;text-align:left;}
.billing-account h3{margin:4px 0 10px;color:#9edfff;}
.billing-account p{color:#d5e4f6;line-height:1.5;}
.billing-login{display:grid;gap:10px;margin:12px 0;}
.billing-login input{width:100%;font-size:16px;color:white;background:#162840;border:1px solid #607c98;border-radius:9px;padding:13px;}
.billing-login button,.billing-account>button{border:0;border-radius:10px;padding:12px;color:#fff;background:#157acc;font-weight:800;cursor:pointer;}
.billing-account .billing-note{font-size:.83rem;color:#aab6c7;}
.plan-btn.action{background:#1aab7c;color:#081726;min-height:42px;}
.plan-btn:disabled{opacity:.75;cursor:not-allowed;}
[hidden]{display:none!important;}

.billing-actions{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0}.billing-actions button{border:0;border-radius:10px;padding:10px;color:#fff;background:#157acc;font-weight:700;}


/* OPENKYAI SUGGESTIONS - self-contained website addition; existing styles above unchanged. */
.suggestions-jump { display: flex; justify-content: center; margin-top: -5px; }
.suggestions-jump-btn {
  background: rgba(19,189,245,.11);
  color: #e0f7ff;
  border: 1px solid rgba(19,189,245,.5);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: .91rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.suggestions-jump-btn:hover { background: rgba(19,189,245,.22); border-color: #7ddcff; }
.suggestions-jump-french { color: #9bd3ec; font-weight: 600; }
.suggestions-card {
  scroll-margin-top: 20px;
  margin: 9px 0 18px;
  padding: clamp(17px, 3.3vw, 30px);
  border-radius: 20px;
  background: linear-gradient(150deg, #15283e, #0b1628 75%);
  border: 1px solid #2f6684;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.suggestions-heading { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; margin-bottom: 20px; }
.suggestions-intro { max-width: 690px; }
.suggestions-eyebrow { margin: 0 0 5px; font-size: .72rem; font-weight: 900; letter-spacing: .13em; color: #7ddcff; }
.suggestions-card h2 { font-size: clamp(1.23rem, 3.8vw, 1.75rem); margin: 0 0 8px; }
.suggestions-summary { color: #b8c9db; line-height: 1.55; margin: 0; }
.suggestions-languages { display: inline-flex; flex-shrink: 0; padding: 4px; background: #081424; border: 1px solid #38536d; border-radius: 999px; }
.suggestions-lang { border: 0; background: none; color: #b8c9db; cursor: pointer; padding: 8px 12px; border-radius: 999px; font-size: .86rem; font-weight: 700; }
.suggestions-lang.active { color: #fff; background: #1268a6; }
.suggestions-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.suggestions-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.suggestions-full-width { grid-column: 1 / -1; }
.suggestions-field label { font-weight: 800; font-size: .88rem; color: #e5f1fc; }
.suggestions-field select, .suggestions-field input, .suggestions-field textarea {
  width: 100%;
  border: 1px solid #44617d;
  border-radius: 12px;
  background: #0b1628;
  color: #fff;
  padding: 12px 13px;
  font: inherit;
  font-size: 1rem;
}
.suggestions-field select:focus-visible, .suggestions-field input:focus-visible,
.suggestions-field textarea:focus-visible, .suggestions-submit:focus-visible,
.suggestions-jump-btn:focus-visible, .suggestions-lang:focus-visible {
  outline: 3px solid #7ddcff;
  outline-offset: 2px;
}
.suggestions-field textarea { resize: vertical; min-height: 118px; line-height: 1.5; }
.suggestions-field input::placeholder, .suggestions-field textarea::placeholder { color: #8ea1b6; opacity: 1; }
.suggestions-privacy { color: #98b1c9; line-height: 1.5; font-size: .81rem; margin: 14px 0 0; }
.suggestions-actions { display: flex; gap: 15px; align-items: center; justify-content: space-between; margin-top: 17px; flex-wrap: wrap; }
.suggestions-status { color: #a8daf0; font-size: .9rem; margin: 0; line-height: 1.5; flex: 1; min-width: 180px; }
.suggestions-status.success { color: #8eeac2; }
.suggestions-status.error { color: #ffaaa5; }
.suggestions-submit { border: 0; border-radius: 12px; padding: 13px 24px; color: #fff; background: linear-gradient(130deg,#0b9ed3,#2563eb); font-weight: 900; cursor: pointer; }
.suggestions-submit:disabled { opacity: .6; cursor: wait; }
.suggestions-bot-trap { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 680px) {
  .suggestions-heading { flex-direction: column; }
  .suggestions-fields { grid-template-columns: 1fr; }
  .suggestions-actions { flex-direction: column; align-items: stretch; }
  .suggestions-submit { width: 100%; }
  .suggestions-jump-btn { max-width: 100%; }
}

/* Explicit subscription entrypoint without changing the token-meter behaviour. */
.billing-quick-access {display:flex;justify-content:center;margin:-5px 0 13px;}
.billing-quick-access button {background:#f5c744;color:#1b2638;border:1px solid #f7d976;border-radius:999px;padding:10px 18px;font-weight:900;font-size:.94rem;cursor:pointer;max-width:100%;}
.billing-quick-access button:focus-visible {outline:3px solid #7ddcff;outline-offset:3px;}
.plan-btn.action{background:#f5c744;color:#18223b;font-weight:900;}


/* Visible PayPal plan choices: independent of the AI chat and voice controls. */
.subscriptions-section{
  background:linear-gradient(135deg,#101a2f,#111b2b);
  border:1px solid #465773;
  border-radius:20px;
  padding:clamp(16px,3vw,24px);
  box-shadow:0 0 30px rgba(19,189,245,.065);
  scroll-margin-top:14px;
}
.subscriptions-headline{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.subscriptions-headline h2{margin:2px 0 7px;font-size:clamp(1.35rem,4.5vw,1.9rem);}
.subscriptions-headline p{margin:0;color:#c7d7ed;}
.subscriptions-eyebrow{font-size:.70rem;font-weight:900;letter-spacing:1.1px;color:#93dfff!important;}
.paypal-identity{background:#f5c744;color:#162b53;border-radius:9px;padding:9px 16px;font-weight:900;font-style:italic;letter-spacing:-.4px;}
.subscriptions-live-state{padding:11px 13px;background:#1b2b40;border:1px solid #3c5574;border-radius:10px;color:#daeafa;font-size:.88rem;line-height:1.45;}
.homepage-pricing-matrix{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.homepage-price-card{border:1px solid #3a506b;border-radius:13px;background:#0d1629;padding:17px 14px;display:flex;flex-direction:column;gap:11px;}
.homepage-price-card.preferred{border-color:#f5c744;box-shadow:0 0 14px rgba(245,199,68,.09);}
.homepage-price-card h3{font-size:1.25rem;margin:0;}
.homepage-price{color:#fbdf88;font-size:1.56rem;font-weight:900;margin:0;line-height:1.25;}
.homepage-price span{display:block;color:#a9c0d6;font-size:.76rem;font-weight:600;margin-top:4px;}
.homepage-price-card>p:not(.homepage-price){margin:0;color:#a9bfd7;font-size:.87rem;flex:1;}
.homepage-price-card .plan-btn{min-height:48px;padding:11px 8px;font-size:.90rem;}
.homepage-price-card .plan-btn.disabled{background:#364456;color:#e0e5ed;border:1px solid #708199;opacity:1;}
.homepage-price-card .plan-btn.action{background:#f5c744;color:#13213a;}
.subscriptions-actions{display:flex;justify-content:center;margin-top:15px;}
.subscriptions-account-btn{background:transparent;color:#f5d77c;border:1px solid #d3ad50;padding:12px 16px;border-radius:12px;font-weight:800;cursor:pointer;}
.subscriptions-terms{margin:15px 0 0;color:#bac8d9;font-size:.77rem;line-height:1.55;}
@media(max-width:720px){.homepage-pricing-matrix{grid-template-columns:1fr;}.homepage-price-card{gap:8px;}.homepage-price-card .plan-btn{width:100%;}}

/* Never start checkout before the signed-in OpenkyAI account is visible. */
.billing-account-banner { color: #e5f4ff; background: #14273e; border: 1px solid #3984a7; border-radius: 11px; padding: 12px 14px; font-size: .91rem; line-height: 1.55; overflow-wrap: anywhere; }
.billing-account-banner strong { color: #ffe186; font-weight: 900; }
.billing-account-banner .account-email { display: block; font-weight: 900; font-size: 1.01rem; color: #ffe186; overflow-wrap: anywhere; }

/* Visible, independent Free registration and login at the top of the website. */
.top-auth-panel{width:100%;margin:-6px auto 2px;}
.top-auth-guest{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;}
.top-auth-panel button{border-radius:13px;min-height:46px;padding:11px 18px;font-weight:850;cursor:pointer;line-height:1.35;}
.top-auth-create{color:#142036;background:linear-gradient(110deg,#facc15,#ffe58b);border:1px solid #fff0b6;box-shadow:0 2px 16px rgba(250,204,21,.15);}
.top-auth-login,.top-auth-manage{color:#e6f8ff;background:#142a43;border:1px solid #42bfe5;}
.top-auth-panel button span{font-weight:650;}
.top-auth-panel button:focus-visible,.billing-auth-choices button:focus-visible{outline:3px solid #84e8ff;outline-offset:3px;}
.top-auth-member{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:center;padding:9px 12px;border:1px solid #275671;border-radius:12px;background:#111e31;}
.top-auth-member-label{font-size:.85rem;color:#cde9fa;overflow-wrap:anywhere;}
.top-auth-member-label strong{color:#ffe186;}
.top-auth-member[hidden],.top-auth-guest[hidden],.billing-login[hidden],.billing-login .billing-note[hidden]{display:none!important;}
.billing-auth-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.billing-auth-choices button{padding:10px 8px;border-radius:9px;border:1px solid #537491;background:#1d324c;color:#e9f4ff;font-weight:750;cursor:pointer;}
.billing-auth-choices button[aria-pressed="true"]{background:#facc15;border-color:#fff1a5;color:#182236;}
.billing-auth-title{color:#ffe58b;margin:4px 0 0;font-size:1.18rem;}
.billing-account .billing-auth-intro{font-size:.92rem;margin:0;color:#deecf9;}
@media(max-width:470px){.top-auth-guest{display:grid;grid-template-columns:1fr;}.top-auth-panel button{width:100%;}.billing-auth-choices button{font-size:.8rem;}}

/* Unapproved PayPal checkout recovery (only shown for APPROVAL_PENDING drafts). */
.subscriptions-retry{width:100%;border:1px solid #eac25f;border-radius:14px;cursor:pointer;
  background:#122b43;color:#ffe18a;font-weight:700;padding:13px 16px;margin:12px 0 16px;
  font-size:clamp(14px,3.6vw,17px);line-height:1.45}
.subscriptions-retry:focus-visible{outline:3px solid #f6cd55;outline-offset:3px}
.subscriptions-retry:hover{background:#1a3d56}
.subscriptions-retry[hidden]{display:none!important}
.subscriptions-retry:disabled{opacity:.55;cursor:progress}

/* Payment recovery: all progress and failures are displayed next to the button,
   not in the account popup far below the fold. */
.billing-retry-feedback{display:block;margin:0 0 16px;padding:13px 15px;border:1px solid #79b6d2;
  border-radius:12px;color:#e8f5ff;background:#173049;font-size:.93rem;line-height:1.5;
  overflow-wrap:anywhere;white-space:pre-wrap}
.billing-retry-feedback[data-level="error"]{border-color:#e6a568;color:#ffe9d2;background:#402720}
.billing-retry-feedback[data-level="success"]{border-color:#78c7a4;color:#defde9;background:#1b3b36}
.billing-retry-feedback[hidden]{display:none!important}

.subscriptions-resume{background:#1a4144;border-color:#7bc8a9;color:#e9ffdc}
.subscriptions-resume:hover{background:#25534a}
.subscriptions-resume[hidden]{display:none!important}

/* Checkout feedback must be visible beside plan buttons, including on narrow phones. */
.checkout-immediate-status {position:sticky; top:8px; z-index:10; padding:14px 16px; margin:10px 0 14px; border:1px solid #5ba6cc; border-radius:12px; background:#142a3f; color:#f1f8ff; font-weight:650; line-height:1.5; box-shadow:0 3px 15px #0005;}
.checkout-immediate-status[hidden] {display:none!important;}
.checkout-immediate-status[data-kind="error"] {border-color:#f3bc66; background:#372a18; color:#fff4d8;}
.checkout-immediate-status[data-kind="success"] {border-color:#70d4a9;}

.modal-pending-recovery{padding:12px;margin:12px 0;border:1px solid #bd9b4d;border-radius:14px;background:#1b2d44;color:#e9f1fa}
.modal-pending-recovery button{display:block;width:100%;margin:10px 0;padding:12px;white-space:normal}
.modal-pending-recovery[hidden],.plan-checkout-message[hidden]{display:none!important}
.plan-checkout-message{margin:9px 0;padding:10px 12px;border-radius:9px;background:#1b2d44;color:#e9f1fa;overflow-wrap:anywhere;font-size:0.92rem}
.plan-checkout-message[data-kind="error"]{border:1px solid #ec9f79;color:#ffe2d4}

/* My Membership: style isolated to the subscription area */
.my-membership-panel{margin:14px 0 18px;padding:17px;border:1px solid rgba(125,199,226,.42);border-radius:16px;background:rgba(28,58,89,.22);color:var(--text,#eef8ff)}
.my-membership-panel[hidden]{display:none!important}
.membership-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;font-weight:700}
.membership-heading strong{color:#bfeefa;background:rgba(23,116,150,.28);padding:6px 12px;border-radius:999px}
.my-membership-panel p{margin:9px 0 0;line-height:1.45}
.my-membership-panel .membership-footnote{font-size:.86rem;opacity:.82}
#myMembershipPending:not([hidden]){padding:9px;border-radius:10px;background:rgba(221,173,64,.12)}


/* Shared + attachment picker: Classic and Robot Mode use the same input bar. */
.chat-attachment-area {width:100%;}
.attachment-preview {display:flex; align-items:center; gap:10px; padding:9px 12px; margin:0 0 8px;
  border:1px solid #356385; border-radius:13px; background:#112338; min-width:0; }
.attachment-preview[hidden], .attachment-status[hidden], .attachment-menu[hidden] {display:none !important;}
.attachment-icon {font-size:1.4rem;}
.attachment-labels {flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.attachment-labels strong {overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:.88rem;}
.attachment-labels small {font-size:.73rem; color:#aad8f4;}
.attachment-remove {flex:0 0 auto; background:#283c53; border:0; border-radius:9px; color:#fff;
  padding:2px 11px; font-size:1.35rem; cursor:pointer;}
.attachment-status {margin:0 0 8px; padding:10px; border-radius:9px; border:1px solid #9a6e4c;
  background:#2a211e; color:#ffe1c4; font-size:.82rem;}
.attachment-privacy {font-size:.72rem; text-align:center; color:#a4b5cf; margin:-12px 6px 10px; line-height:1.5;}
.attachment-control {position:relative; display:flex; align-items:center; flex:0 0 auto;}
.input-container .attach-btn {border:1px solid #3e81af; width:46px; height:46px; padding:0;
  border-radius:13px; background:#142941; color:#8ce6ff; font-weight:500; font-size:2rem;
  line-height:1; display:flex; align-items:center; justify-content:center;}
.input-container .attach-btn:focus-visible {outline:2px solid #8ce6ff; outline-offset:2px;}
.attachment-menu {position:absolute; bottom:calc(100% + 12px); left:0; display:flex; flex-direction:column;
  min-width:212px; max-width:calc(100vw - 50px); border:1px solid #446781; border-radius:14px;
  background:#10243a; padding:5px; box-shadow:0 8px 32px #000a; z-index:35;}
.input-container .attachment-menu button {background:transparent; border:0; text-align:left;
  color:#f1faff; padding:12px 10px; border-radius:9px; font-weight:650; white-space:nowrap;}
.input-container .attachment-menu button:active, .input-container .attachment-menu button:hover {background:#234666;}
.attachment-file-input {display:none!important;}
@media(max-width:470px){.input-container .attach-btn{width:42px;height:44px;font-size:1.85rem;}
  .attachment-menu{min-width:190px;}.input-container button#sendBtn{padding:0 12px;}}
