/* Any AI? — compact task composer, approved 184px mobile concept.
 * Only the homepage form; no changes to search, STT, header or footer.
 */
.lh-page .lh-task-input.aiai-compact-composer{
  --aiai-charcoal:#1b1e20;
  --aiai-cream:#fffefa;
  --aiai-ivory:#faf9f6;
  --aiai-warm-border:#e0ded7;
  position:relative;display:grid;grid-template-rows:minmax(0,1fr) 48px;
  gap:9px;height:184px;min-height:184px;
  margin-top:2rem;padding:16px 15px 14px;
  border:1px solid var(--aiai-warm-border);
  border-radius:17px;background:var(--lh-card);
  box-shadow:0 2px 13px rgba(43,52,34,.04),0 1px 2px rgba(25,44,19,.02);
  transition:border-color .2s ease,box-shadow .2s ease;
}
.lh-page .lh-task-input.aiai-compact-composer:focus-within{
  border-color:#cfd5ce;
  box-shadow:0 3px 16px rgba(37,45,41,.055),0 0 0 1px rgba(204,214,207,.28);
}
.lh-page .aiai-compact-composer .lh-composer-field{
  position:relative;min-height:0;overflow:hidden;
}
.lh-page .aiai-compact-composer .lh-composer-field textarea{
  display:block;width:100%;height:100%;min-height:0;max-height:100%;
  padding:3px 3px 4px;resize:none;background:transparent;
  line-height:1.95;font-size:15.2px;font-weight:450;
  border:none!important;outline:none!important;box-shadow:none!important;
  overflow-y:auto;overscroll-behavior:contain;
  color:var(--lh-foreground);scrollbar-width:thin;
}
.lh-page .aiai-compact-composer .aiai-home-placeholder{
  inset-block-start:3px;inset-inline-start:3px;inset-inline-end:3px;
  font-size:15.2px;line-height:1.95;
}
/* One control row; positions are deliberately unchanged in each voice mode. */
.lh-page .aiai-compact-composer .aiai-composer-actions{
  display:flex;direction:rtl;align-items:stretch;gap:8px;
  height:48px;min-height:48px;position:relative;
}
.lh-page .aiai-compact-composer .aiai-search-action.lh-primary-button{
  width:calc(100% - 56px);flex:0 0 calc(100% - 56px);
  min-width:0;height:48px;margin:0;padding:0 15px 0 14px;
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  border-radius:13px;
  border:1px solid #e1dfd9;
  background:linear-gradient(147deg,#fdfcf9 0%,#f0eee9 98%);
  color:#505751;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.98),0 1px 2px rgba(42,46,40,.032);
  font-family:"Readex Pro",sans-serif!important;
  font-size:14.5px!important;font-weight:600!important;line-height:1.1!important;
  opacity:1;white-space:nowrap;position:relative;z-index:1;
  transition:width .28s cubic-bezier(.2,.7,.2,1),
    flex-basis .28s cubic-bezier(.2,.7,.2,1),padding .28s cubic-bezier(.2,.7,.2,1),
    color .2s ease,background .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.lh-page .aiai-compact-composer .aiai-search-action.lh-primary-button[data-state="idle"],
.lh-page .aiai-compact-composer .aiai-search-action.lh-primary-button[data-state="idle"]:hover{
  background:linear-gradient(147deg,#fdfcf9 0%,#f0eee9 98%);
  color:#505751;border-color:#e1dfd9;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.98),0 1px 2px rgba(42,46,40,.032);
  cursor:default;opacity:1
}
.lh-page .aiai-compact-composer .aiai-search-action.lh-primary-button[data-state="ready"],
.lh-page .aiai-compact-composer .aiai-search-action.lh-primary-button[data-state="ready"]:hover,
.lh-page .aiai-compact-composer .aiai-search-action.lh-primary-button[data-state="submitting"]{
  background:linear-gradient(154deg,#282c2d 0%,#151819 100%);
  color:var(--aiai-cream);border-color:#171b1d;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 3px 10px rgba(18,24,26,.11);
  opacity:1;
}
.lh-page .aiai-compact-composer .aiai-search-action.lh-primary-button:disabled{opacity:1;cursor:default}
.lh-page .aiai-compact-composer .aiai-search-action .aiai-search-wordmark{
  display:inline-flex;align-items:baseline;gap:.32em;
  min-width:0;white-space:nowrap;transition:opacity .14s ease;
}
.lh-page .aiai-compact-composer .aiai-search-action .aiai-search-wordmark bdi{
  font-family:"Readex Pro",sans-serif;letter-spacing:-.025em;
  font-size:1.02em;unicode-bidi:isolate;
}
.lh-page .aiai-compact-composer .aiai-search-action .lh-arrow{
  width:18px;height:18px;flex:none;opacity:.75;stroke:currentColor;
  transition:opacity .2s ease,transform .2s ease;
}
.lh-page .aiai-compact-composer .aiai-search-action[data-state="ready"] .lh-arrow{
  opacity:1;transform:translateX(-2px);
}
/* Mic is calm before recording and occupies the same 48px control row. */
.lh-page .aiai-compact-composer .aiai-voice-button{
  position:relative;inset:auto;left:auto;right:auto;bottom:auto;top:auto;
  flex:0 0 48px;display:grid;place-items:center;
  width:48px;min-width:48px;height:48px;min-height:48px;
  padding:0;z-index:1;border-radius:14px;border:1px solid #e1e4e0;
  background:#f5f6f3;color:#404d4b;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
  transition:opacity .18s ease,transform .24s ease,
    background .2s ease,border-color .2s ease;
}
.lh-page .aiai-compact-composer .aiai-voice-button[hidden]{display:none!important}
.lh-page .aiai-compact-composer .aiai-voice-button svg{
  width:20px;height:20px;stroke-width:1.75;
}
@media(hover:hover) and (pointer:fine){
  .lh-page .aiai-compact-composer .aiai-voice-button[data-state="idle"]:hover{
    background:#edf0ec;border-color:#ced4cf;
  }
}
.lh-page .aiai-compact-composer .aiai-voice-button::after{display:none!important}
.lh-page .aiai-compact-composer .aiai-voice-button[data-state="listening"]{
  background:#f5f6f3;border-color:#e1e4e0;color:#404d4b;box-shadow:none;
}
.lh-page .aiai-compact-composer .aiai-voice-button:active:not(:disabled){
  transform:scale(.965);
}
/* Existing voice feedback is screen-reader live status; visible only if the
 * engine reports an actionable error. Never interrupt a speaker with tips. */
.lh-page .aiai-compact-composer .aiai-voice-feedback{
  position:absolute;z-index:4;right:16px;left:16px;bottom:77px;
  display:none;gap:0;align-items:center;justify-content:flex-start;
  margin:0;padding:8px 11px;min-height:0;max-height:55px;
  background:#f6f5f1;border:1px solid #e2dfd8;border-radius:9px;
  font-size:12px;color:#5b625d;line-height:1.55;
  overflow:hidden;box-shadow:0 2px 8px rgba(28,33,30,.05);
}
.lh-page .aiai-compact-composer .aiai-voice-feedback[data-aiai-visible="error"]:not([hidden]){
  display:flex;
}
.lh-page .aiai-compact-composer .aiai-voice-feedback [data-aiai-voice-message]{
  overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow-wrap:anywhere;
}
/* Desktop retains a little more writing area, but never the old giant card. */
@media(min-width:768px){
  .lh-page .lh-task-input.aiai-compact-composer{
    height:198px;min-height:198px;padding:18px 18px 16px;
    border-radius:18px;margin-top:2.25rem;
  }
}
@media(max-width:355px){
  .lh-page .lh-task-input.aiai-compact-composer{padding-inline:12px}
}
/* RTL system keyboard and reduced-motion safety. */
@media(prefers-reduced-motion:reduce){
  .lh-page .aiai-compact-composer,
  .lh-page .aiai-compact-composer .aiai-voice-button,
  .lh-page .aiai-compact-composer .aiai-search-action{transition:none!important}
}
