/* Shared chat surface, expert states and paired platform demos. */
.phone.has-bottom-tabs:not(.has-chat) #content,.phone.has-bottom-tabs:not(.has-chat) #content.device-detail-layout{bottom:112px}
#footer.device-navigation .tabs{margin-top:0}
.chat-title{max-width:150px;line-height:18px;text-align:center}
.chat-title small{display:block;font-size:10px;color:#83917d;font-weight:400}
.chat-header-actions{display:flex;align-items:center;gap:4px}
.chat-page .square-chat-header{display:grid;grid-template-columns:1fr auto 1fr;column-gap:4px}
.square-chat-header .chat-header-actions{justify-self:end}
.chat-square-back{display:inline-flex;justify-self:start;align-items:center;gap:3px;min-height:44px;padding:0 10px 0 7px;border-radius:22px;background:#ffffff66;box-shadow:0 4px 16px #0409110d;color:var(--ink);font-size:13px;white-space:nowrap}
.phone[data-platform="ios"] .statusbar{padding-left:25px;padding-right:20px;font-size:14px}
.phone[data-platform="ios"] .statusbar>div{gap:4px;transform:scale(.84);transform-origin:right center}
.phone[data-platform="ios"] .statusbar img:nth-child(1){display:none}
#expert-root{position:absolute;z-index:24;top:10px;left:50%;transform:translateX(-50%);width:196px;height:35px;pointer-events:none;transition:width .42s cubic-bezier(.22,.84,.25,1),height .42s cubic-bezier(.22,.84,.25,1),top .35s}
.expert-compact{display:flex;align-items:center;justify-content:space-between;width:100%;height:35px;border-radius:25px;padding:6px 9px;background:#080909;color:white;pointer-events:auto;transition:opacity .18s,transform .3s}
.expert-compact>span:last-child{font-size:13px;line-height:20px}
.expert-bot {
 width:22px;
 height:22px;
 flex-shrink:0;
 position:relative;
 border-radius:50%;
 background:linear-gradient(135.61606deg,#8fff52 2.6382%,#40d038 103.06%);
}
.expert-bot i {
 position:absolute;
 top:36.363636%;
 left:27.272727%;
 width:13.636364%;
 height:22.727273%;
 border-radius:36px;
 background:white;
}
.expert-bot i+i {left:auto;right:27.272727%}
.expert-card{position:absolute;top:0;left:0;width:100%;padding:25px 24px 20px;border-radius:38px;background:#050606;color:white;box-shadow:0 8px 16px #0004;pointer-events:auto;animation:expertBloom .38s cubic-bezier(.2,.8,.2,1);transform-origin:top center;overflow:hidden}
.expert-copy{display:flex;align-items:center;gap:16px;min-height:58px}
.expert-copy .expert-bot{width:34px;height:34px}
.expert-copy strong{font-size:16px;font-weight:500;line-height:22px}
.expert-copy p{font-size:14px;line-height:19px;color:#969d98;margin-top:2px}
.expert-buttons{display:flex;gap:12px;margin-top:20px}
.expert-buttons button{flex:1;min-height:44px;border-radius:28px;background:#2c2c2d;color:#c3c7c4;font-size:16px;line-height:24px;padding:10px}
.expert-buttons button:last-child{color:#8bcb82;background:#6bb66733}
#expert-root.expanded{width:calc(100% - 8px);height:116px}
#expert-root.expanded.manual{height:164px}
#expert-root.expanded .expert-compact{opacity:0;transform:scale(.82);pointer-events:none}
.expert-backdrop{position:absolute;inset:0;z-index:23;background:#15201320;backdrop-filter:blur(1px);border-radius:inherit}
.phone[data-platform="android"] #expert-root{top:62px;width:88px;height:42px}
.phone[data-platform="android"] .expert-compact{height:42px;background:#ffffff99;color:#162313;box-shadow:0 4px 16px #0409110d;padding:9px 12px;gap:10px}
.phone[data-platform="android"] #expert-root.expanded{top:10px;width:calc(100% - 8px)}
.phone[data-platform="android"] .chat-title{visibility:hidden}
.phone[data-platform="android"]:not(.has-chat) #expert-root:not(.expanded){top:13px;width:82px;height:32px}
.phone[data-platform="android"]:not(.has-chat) .expert-compact{height:32px;background:#ffffff88;box-shadow:none}
@keyframes expertBloom{from{opacity:0;transform:scale(.62,.35);filter:blur(3px)}to{opacity:1;transform:scale(1);filter:blur(0)}}
/* The 32px Figma character rests on the top edge of the navigation bar.
   Its 44px button stays still while the figure and its eyes animate. */
.robot-launcher {
 position:absolute;
 left:calc(75% + 7.25px);
 bottom:calc(100% + 1px);
 width:44px;
 height:44px;
 z-index:6;
}
.robot-trigger {
 position:relative;
 display:flex;
 align-items:flex-end;
 justify-content:center;
 width:44px;
 height:44px;
 border-radius:14px;
 z-index:3;
}
.robot-trigger:focus-visible {outline:2px solid var(--green);outline-offset:2px}
.robot-figure {
 position:relative;
 display:inline-block;
 width:32px;
 height:32px;
 flex:none;
 pointer-events:none;
 transform-origin:50% 100%;
}
.robot-body {position:absolute;left:0;top:4px;display:block}
.robot-eyes {
 position:absolute;
 top:14px;
 left:9px;
 width:14.545px;
 display:flex;
 justify-content:space-between;
}
.robot-eyes i {width:4.364px;height:7.273px;border-radius:52.364px;background:white}
@media (prefers-reduced-motion:no-preference) {
 .robot-launcher:not(.open) .robot-figure {animation:robotSquash 2s linear infinite,robotHop 2s linear infinite}
 .robot-launcher:not(.open) .robot-eyes i {animation:robotBlink 2s linear infinite}
}
@keyframes robotSquash {
 0%,100% {transform:scale(1)}
 17% {transform:scale(1);animation-timing-function:ease-in-out}
 23% {transform:scale(1.08,.92);animation-timing-function:ease-out}
 27.5% {transform:scale(.96,1.06);animation-timing-function:ease-out}
 33% {transform:scale(1)}
 44% {transform:scale(1);animation-timing-function:ease-out}
 47% {transform:scale(1.13,.88);animation-timing-function:ease-out}
 53.5% {transform:scale(.97,1.035);animation-timing-function:ease-in}
 60% {transform:scale(1.035,.97);animation-timing-function:ease-out}
 70% {transform:scale(1)}
}
@keyframes robotHop {
 0%,100% {translate:0 0}
 23% {translate:0 0;animation-timing-function:ease-out}
 33% {translate:0 -11px;animation-timing-function:ease-in}
 44% {translate:0 0}
 47% {translate:0 0;animation-timing-function:ease-out}
 53.5% {translate:0 -2.5px;animation-timing-function:ease-in}
 60% {translate:0 0}
}
@keyframes robotBlink {
 0%,100% {transform:scaleY(1)}
 6% {transform:scaleY(1);animation-timing-function:ease-in-out}
 9.5% {transform:scaleY(.12)}
 12.5% {transform:scaleY(.12);animation-timing-function:ease-out}
 17% {transform:scaleY(1)}
}
.robot-fan{position:absolute;right:0;bottom:4px;width:155px;height:145px;pointer-events:none}
.robot-fan button{position:absolute;right:4px;bottom:0;width:56px;height:65px;display:flex;flex-direction:column;align-items:center;gap:4px;opacity:0;transform:scale(.3);transform-origin:75% 100%;transition:opacity .22s,transform .36s cubic-bezier(.18,.9,.25,1.22);pointer-events:none}
.robot-fan b{width:45px;height:45px;border-radius:50%;background:#fffefa;box-shadow:0 4px 18px #2b542324;display:grid;place-items:center;color:#5d9e58;font-weight:500;font-size:19px;border:1px solid white}
.robot-fan span{font-size:10px;color:#52684c;line-height:14px;background:#ffffffbb;border-radius:8px;padding:0 5px}
.open .robot-fan button{opacity:1;pointer-events:auto}
.open .robot-fan button:first-child{transform:translate(-66px,-31px) scale(1)}
.open .robot-fan button:last-child{transform:translate(4px,-78px) scale(1);transition-delay:.04s}
.chat-underlay{position:absolute;inset:54px 0 34px;pointer-events:none;overflow:hidden;opacity:.75;filter:brightness(.93);z-index:2}
.underlay-content{position:absolute;inset:0 0 80px;overflow:hidden}
.underlay-footer{position:absolute;left:16px;right:16px;bottom:0}
.phone.chat-sheet-open #content{z-index:6;top:76px;bottom:112px;background:linear-gradient(204deg,#f0f8ec,#f5eded);border:1px solid #fff;border-bottom:0;border-radius:29px 29px 0 0;left:5px;right:5px;box-shadow:0 -12px 28px #213e181f;animation:chatSheetIn .4s cubic-bezier(.2,.8,.2,1)}
.phone.chat-sheet-open #footer{z-index:7;bottom:34px;left:5px;right:5px;border-radius:0 0 28px 28px;border-top:0;padding:12px 16px 18px;background:#f4efed;animation:chatSheetIn .4s cubic-bezier(.2,.8,.2,1);box-shadow:none;backdrop-filter:none}
.phone.chat-sheet-open #footer .composer{border:1px solid white;box-shadow:0 3px 12px #31402a09;background:#ffffffb8}
.phone.chat-sheet-open .chat-page .page-header{background:linear-gradient(#f0f8ec,#f0f8ecbb);height:64px}
.phone.chat-sheet-open .chat-page{min-height:100%}
.phone.chat-sheet-open.sheet-leaving #content,.phone.chat-sheet-open.sheet-leaving #footer{animation:chatSheetOut .23s ease forwards}
.phone.chat-sheet-open #toast{z-index:40}
.phone.chat-sheet-open .recording-surface{z-index:16}
.phone.chat-sheet-open .new-reply{z-index:10;bottom:120px}
.phone.composing #content{bottom:112px}
.phone.chat-sheet-open.composing #content{bottom:112px}
@keyframes chatSheetIn{from{transform:translateY(90%);opacity:.1}to{transform:none;opacity:1}}
@keyframes chatSheetOut{to{transform:translateY(100%);opacity:.1}}
.platform-switch{display:flex;gap:3px;align-items:center;background:#e3ebdf;border-radius:14px;padding:3px}
.demo-toolbar .platform-switch button{font-size:11px;padding:5px 10px;border-radius:11px;background:transparent;line-height:18px}
.demo-toolbar .platform-switch button[aria-pressed="true"]{background:#fff;color:#4c8645;box-shadow:0 2px 5px #233d1420}
.demo-toolbar{gap:7px;flex-wrap:wrap}
.demo-toolbar>span{font-size:10px}
.v9-quick-prompts{display:flex;flex-wrap:wrap;gap:7px;padding:0 16px;margin-top:12px}
.v9-quick-prompts button{border-radius:16px;background:#ffffff99;border:1px solid white;font-size:12px;padding:8px 12px;text-align:left;line-height:20px}
.chat-welcome{padding:45px 28px 12px;color:#65775c;text-align:center}
.chat-empty-mark{width:52px;height:52px;margin:0 auto 16px;border-radius:18px;display:grid;place-items:center;background:#ffffff80;box-shadow:0 7px 28px #5173490c}
@media(max-width:700px){.phone.chat-sheet-open #footer{bottom:max(26px,env(safe-area-inset-bottom))}.phone.chat-sheet-open #content{top:70px;bottom:104px}.phone.chat-sheet-open.composing #content{bottom:104px}.phone.has-bottom-tabs:not(.has-chat) #content{bottom:104px}.phone.has-chat:not(.chat-sheet-open) #content{bottom:170px}.phone.has-chat.composing:not(.chat-sheet-open) #content{bottom:104px}.demo-toolbar .platform-switch{margin-left:auto}.phone[data-platform="ios"] .statusbar{padding-left:21px;padding-right:17px}}
@media(max-width:350px){#expert-root{width:166px}.expert-copy{gap:12px}.expert-copy p{font-size:13px}.expert-card{padding:22px 20px 18px}.phone[data-platform="ios"] .statusbar>div img:not(:last-child){display:none}.chat-title{max-width:126px}}
@media(prefers-reduced-motion:reduce){#expert-root,.expert-card,.robot-trigger,.robot-fan button,.phone.chat-sheet-open #content,.phone.chat-sheet-open #footer{animation:none!important;transition:none!important}}

@media(max-width:700px){.demo-toolbar{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.demo-toolbar::-webkit-scrollbar{display:none}.demo-toolbar>*{flex-shrink:0}.demo-toolbar .platform-switch{margin-left:0}}

.phone[data-platform="android"].chat-sheet-open #expert-root:not(.expanded){top:88px}
@media(max-width:700px){.phone[data-platform="android"].chat-sheet-open #expert-root:not(.expanded){top:82px}}
.expert-compact>span:last-child{white-space:nowrap;flex-shrink:0}
.phone[data-platform="android"]:not(.has-chat) .expert-compact{padding:5px 9px;gap:6px}

/* Robot guidance sits beside the character, clear of the bottom navigation. */
.robot-hint{position:absolute;right:48px;bottom:8px;width:clamp(176px,calc(100vw - 144px),224px);padding:13px 34px 13px 15px;border:1px solid #dce9d6;border-radius:18px 18px 5px 18px;background:#fffef9;color:#4d6346;box-shadow:0 5px 20px #3b613319;animation:robotHintIn .25s ease;z-index:4}
.robot-hint::after{content:"";position:absolute;right:-6px;bottom:10px;width:10px;height:10px;transform:rotate(-45deg);background:#fffef9;border-right:1px solid #dce9d6;border-bottom:1px solid #dce9d6}
.robot-hint p{font-size:12px;line-height:20px;margin:0;text-align:left}
.robot-hint button{position:absolute;right:2px;top:3px;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;font-size:19px;line-height:1;color:#8a9b82;background:transparent}
.robot-hint button:hover{background:#eff5e9;color:#3d6734}
.robot-hint button:focus-visible{outline:2px solid #5b964a;outline-offset:-4px}
@keyframes robotHintIn{from{opacity:0;transform:translate(4px,6px) scale(.97)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.robot-hint{animation:none}}

/* Topic square and history from the current 375px product frames. */
.figma-page[data-platform="ios"] .statusbar{padding:9px 29px 0 min(13.33%,50px);font-size:17px}
.figma-page[data-platform="ios"] .statusbar>div{transform:none;gap:7px}
.figma-page[data-platform="ios"] .statusbar>div img{display:block}
.figma-icon{display:block;flex:none;object-fit:contain}
.tab-glyph{width:24px;height:24px;display:grid;place-items:center}
#footer.entry-footer{border-radius:32px;padding:8px}
.entry-composer{display:flex;align-items:center;height:56px;padding:6px 6px;background:#ffffff99;border:1px solid #fff;border-radius:30px}
.entry-composer button{min-width:44px;min-height:44px;display:grid;place-items:center;flex:none}
.entry-composer .entry-placeholder{display:block;flex:1;min-width:0;text-align:left;color:var(--muted);font-size:16px;font-weight:400;padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.phone:has(>#footer.entry-footer) #content{bottom:170px}
.phone[data-page="historySearch"] #content{bottom:34px}
.home-page,.home-page.has-hardware{display:flex;flex-direction:column;height:100%;min-height:0;padding:0}
.home-page .page-header{height:60px;flex:none;padding:8px 16px}
.home-page .child-switch{width:44px;height:44px;padding:0;background:white;border:2px solid white;box-shadow:none}
.home-page .child-switch img{width:100%;height:100%}
.home-page .hardware-slot{flex:none}
.home-page .card-deck{flex:1 0 252px;container-type:size;top:auto;min-height:252px;height:auto;display:grid;place-items:center;transform:none}
.home-page .topic-card{--card-width:clamp(154px,min(calc(100cqh - 122px),calc(100cqw - 76px)),240px);position:absolute;left:50%;top:50%;translate:-50% -50%;width:var(--card-width);height:auto;min-height:0;border-radius:20px;padding:12px;gap:12px;box-shadow:none;align-items:stretch}
.home-page .topic-card>img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;object-position:center;border-radius:12px}
.home-page .topic-card p{min-height:44px;font-size:14px;line-height:22px;margin:0}
.home-page .topic-cta{min-height:38px;padding:8px 12px;line-height:22px;gap:4px}
.home-page .topic-card.prev,.home-page .topic-card.next{opacity:1}
.home-page .topic-card.prev{transform:translateX(calc(-.9 * var(--card-width) - 23px)) rotate(-3deg) scale(.8)}
.home-page .topic-card.next{transform:translateX(calc(.9 * var(--card-width) + 23px)) rotate(3deg) scale(.8)}
.home-page .topic-card:focus-visible{outline-offset:2px}
.history-page .page-header{height:60px;padding:8px 16px}
.history-page .page-header h2{font-size:16px;line-height:24px;font-weight:600}
.history-body,.history-search-page{padding:0 16px 16px}
.history-body h3,.history-search-page h3{display:flex;align-items:flex-end;height:48px;padding:0 12px 8px;margin:0;font-size:16px;line-height:24px;font-weight:600}
.history-rows{display:grid;gap:8px}
.history-row{width:100%;min-height:54px;padding:12px;display:flex;gap:12px;align-items:center;justify-content:space-between;border-radius:20px;background:#ffffff66;border:.5px solid white;text-align:left;font-size:14px;line-height:22px}
.history-row>span{min-width:0;overflow-wrap:anywhere}
.history-row small{display:block;font-size:12px;color:var(--muted);line-height:18px}
.history-row mark{background:#d9efd6;color:inherit}
.history-unread{display:inline-block;width:6px;height:6px;margin-left:6px;vertical-align:middle;background:var(--green);border-radius:100%}
.history-no-results{text-align:center;margin:16px 0;color:var(--muted);font-size:12px;line-height:18px}
.history-search-bar{display:flex;align-items:center;gap:12px;padding:8px 0}
.history-search-bar label{display:flex;align-items:center;flex:1;gap:10px;min-width:0;height:44px;padding:10px;background:#ffffff66;border:.5px solid white;border-radius:24px;box-shadow:0 4px 16px #0409110d}
.history-search-bar input{width:100%;min-width:0;font-size:14px;line-height:22px}
.history-search-bar button{min-height:44px;padding:0 1px 0 4px}
.history-search-page .history-filters{display:flex;gap:12px;margin:8px 0;padding:0;min-height:30px}
.history-search-page .history-filters button{min-height:30px;padding:2px 16px;background:#ffffff66;border:.5px solid white;border-radius:20px;font-size:14px;line-height:22px}
.history-search-page .history-filters button[aria-pressed="true"]{background:var(--green);border-color:var(--green);color:white}
@media(max-height:720px){.phone:has(>#footer.entry-footer) #content{bottom:158px}.home-page .topic-card{gap:8px}.home-page .topic-cta{min-height:32px;padding:5px 10px}}
.phone.figma-page[data-platform="ios"] .statusbar>div img:nth-child(n){display:block}
.phone.figma-page #footer.entry-footer,.phone:is([data-page="deviceNotes"],[data-page="deviceNoteDetail"]) #footer.device-navigation{left:20px;right:12px;bottom:max(34px,env(safe-area-inset-bottom));border:0;box-shadow:inset 0 0 0 1px white,0 4px 16px #0409110d}
.tabs button:not(.active){opacity:1;color:var(--muted)}
.tab-glyph-muted{opacity:.4}
.home-page .child-switch{transform:translateY(-3px)}
.entry-composer .entry-hold{flex:1;color:var(--muted);font-size:16px;touch-action:none;user-select:none;-webkit-user-select:none}
.history-search-bar input:focus-visible{outline:none}
.history-search-bar label:focus-within{box-shadow:0 0 0 2px #6bb66766}

/* The conversation home shares the square's status bar, composer and bottom tabs. */
.phone[data-page="home"] #expert-root { display: none; }
.phone[data-page="home"]:has(> #footer.entry-footer) #content {
  bottom: calc(max(34px, env(safe-area-inset-bottom)) + 145px);
  padding-bottom: 0;
}
.phone[data-page="home"].composing:has(> #footer.entry-footer) #content {
  bottom: calc(max(34px, env(safe-area-inset-bottom)) + 88px);
}
.phone[data-page="home"] #footer.entry-footer {
  border: 0;
  bottom: max(34px, env(safe-area-inset-bottom));
}
.home-page.unified-home {
  display: grid;
  grid-template-rows: 60px minmax(0,1fr);
  container-type: size;
  height: 100%;
  min-height: 0;
  padding: 0;
}
.unified-home .unified-header {
  padding: 8px 16px;
  height: 60px;
}
.unified-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.unified-header .icon-btn {
  border: 1px solid #fff;
  background: rgb(255 255 255 / 49%);
}
.unified-header .child-switch {
  position: relative;
  transform: none;
}
.unified-bell { position: relative; }
.unified-bell svg { width: 24px; height: 24px; display: block; }
.unified-badge {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 12px;
  padding: 0 3px;
  border-radius: 10px;
  background: #e92e26;
  color: white;
  font: 600 9px/12px -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;
  text-align: center;
  pointer-events: none;
}
.unified-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: start;
  gap: 8px;
  padding: clamp(10px,8cqh,52px) 12px 0;
}
.chat-welcome-copy { min-width:0; max-width:100%; text-align:center; }
.chat-welcome-copy h1 {
  margin: 0;
  color: #08131e;
  font-size: clamp(1.125rem,5cqw,1.25rem);
  line-height: 1.45;
  font-weight: 650;
  text-wrap: balance;
}
.hardware-card.list-card .hardware-copy strong,
.hardware-card.list-card .hardware-detail {
  white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere;
}
.hardware-card.list-card .hardware-copy { gap:4px; }
.hardware-card.list-card .hardware-copy strong { font-size:.9375rem; line-height:1.45; }
.hardware-card.list-card .hardware-detail { font-size:.8125rem; line-height:1.55; color:#7a644b; }
.hardware-card.list-card.read .hardware-detail { color:#63705e; }
@container (max-height: 245px) {
  .unified-welcome { flex-direction: row; justify-content: center; padding-top: 4px; }
  .unified-welcome h1 { font-size: 18px; }
}
