/* interface-v36.css */
/* AK AI — reference interface. Existing APIs, history and auth remain in use. */
html body{--ui36-panel:#141414;--ui36-sheet:#1c1c1e;--ui36-line:#303030;color-scheme:dark}
html body .ak-topbar{position:relative;min-height:76px!important;display:flex;align-items:center;padding:12px 16px!important}
html body .topbar-title>div,html body .topbar-actions,html body .ak-topbar>.ak-style-options{display:none!important}
html body .ui36-tabs{display:flex;position:absolute;left:50%;transform:translateX(-50%);padding:3px;border:1px solid #292929;border-radius:28px;background:#141414;height:48px;box-sizing:border-box}
html body .ui36-tab{background:none;color:#f5f5f5;border:0;border-radius:24px;padding:8px 21px;font:500 16px/22px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;min-width:90px}
html body .ui36-tab[aria-selected=true]{background:#000}
html body .ui36-header-actions{display:flex;gap:4px;margin-left:auto}
html body .ui36-round{display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;border:1px solid #292929;border-radius:50%;background:#141414;color:white;padding:9px;cursor:pointer}
html body .ui36-round img{width:26px;height:26px}
html body .welcome-panel{display:none!important}
html body .composer.ak-unified-mounted{background:#141414!important;border-radius:29px!important;margin-bottom:max(12px,env(safe-area-inset-bottom))!important;box-shadow:inset 0 1px 2px #ffffff0c!important}
html body .ak-v61-composer{grid-template-columns:44px minmax(0,1fr)44px 44px!important;gap:0!important;padding:5px!important}
html body .ui36-native-upload{display:none!important}
html body #ui36-attach{grid-column:1;grid-row:2;border:0;background:none}
html body #ak-v61-voice{grid-column:3;grid-row:2;width:44px!important;height:44px!important}
html body #ak-v61-send,html body #ui36-stop{grid-column:4;grid-row:2;width:40px!important;height:40px!important;min-width:40px;min-height:40px;border:0;background:white!important;color:black!important;border-radius:50%;padding:9px;justify-self:center}
html body #ak-v61-send img,html body #ui36-stop img{filter:brightness(0);width:26px;height:26px}
html body #ak-v61-message{font-size:17px!important;line-height:24px!important;min-height:44px!important;padding:10px 3px!important;background:none!important;resize:none}
html body #ak-v61-message::placeholder{color:#848484!important}
html body .ui36-model{display:none;border:0;background:none;color:#f3f3f3;font:400 14px/20px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;padding:10px 0;align-items:center;gap:4px;justify-self:end}
html body .ui36-model img{width:14px;height:14px;opacity:.6}
html body .ak-v61-composer.ui36-expanded{padding:8px!important;row-gap:8px!important}
html body .ui36-expanded #ak-v61-attachments{grid-row:1;display:flex;gap:10px;overflow:auto;padding:0!important}
html body .ui36-expanded #ak-v61-message{grid-column:1/-1;grid-row:2;min-height:52px!important;padding:12px 6px!important}
html body .ui36-expanded :is(#ui36-attach,#ak-v61-voice,#ak-v61-send,#ui36-stop){grid-row:3}
html body .ui36-expanded .ui36-model{display:flex;grid-column:2;grid-row:3}
html body .ui36-expanded.ak-settings-open .ak-mode-select{grid-row:4!important;grid-column:1/-1!important;margin:0!important}
html body #ak-v61-attachments:empty{display:none!important}
html body .ak-attachment{position:relative;display:flex!important;flex-direction:column;justify-content:space-between;flex-shrink:0;width:120px!important;height:120px!important;box-sizing:border-box;background:#3c3c3c!important;border:0!important;border-radius:20px!important;padding:14px 12px!important;gap:5px!important}
html body .ak-attachment>img{order:-1;width:24px;height:24px}
html body .ak-attachment strong{font-size:16px!important;line-height:22px!important;font-weight:400!important;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere;margin:0}
html body .ak-attachment>span{display:none}
html body .ak-attachment.uploading>span,html body .ak-attachment.error>span{display:block;position:absolute;top:42px;left:12px;font-size:10px!important}
html body .ak-attachment-remove{position:absolute;top:8px;right:8px;width:24px!important;height:24px!important;min-width:24px!important;padding:4px!important;background:#202020!important;border:0!important;border-radius:50%;color:white}
html body .ak-attachment-remove img{width:16px;height:16px}
html body .ak-task-files{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
html body .ak-task-files a{display:flex;flex-direction:column;justify-content:space-between;gap:22px;background:#3c3c3c;border-radius:20px;width:120px;height:120px;box-sizing:border-box;padding:14px 12px;text-decoration:none;font:400 16px/22px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;overflow:hidden}
html body .ak-task-files a img{width:24px;height:24px;flex-shrink:0}
html body .ak-task-files a strong{font-weight:400;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
html body .ak-task-user:has(.ak-task-files){background:transparent!important;padding:0!important}
html body .ak-task-head{font-size:17px!important;font-weight:400!important}
html body .ak-task-head strong{font-weight:400;color:#888}
html body dialog.ui36-library{position:fixed;inset:auto 0 0;width:min(100%,640px);height:calc(100dvh - 58px);max-height:calc(100dvh - 58px);max-width:100%;margin:0 auto;padding:0;border:0;border-radius:38px 38px 0 0;background:#1c1c1e;color:#f5f5f5;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;overflow:hidden;box-sizing:border-box}
html body dialog.ui36-library[open]{display:flex;flex-direction:column}
.ui36-library::backdrop{background:#0009}
html body .ui36-library header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid #2b2b2b;flex-shrink:0}
html body .ui36-library h2{font-size:17px;line-height:22px;font-weight:600;padding:0;margin:0}
html body .ui36-library .ui36-upload{display:flex;align-items:center;gap:16px;text-align:left;color:white;background:none;border:0;border-bottom:1px solid #303030;margin:0 20px;padding:20px 0;font-size:17px;line-height:22px;flex-shrink:0}
.ui36-upload img{width:22px;height:22px}
html body .ui36-library h3{font-size:17px;font-weight:600;line-height:22px;margin:26px 20px 16px}
html body .ui36-library .ui36-status{margin:0 20px 12px;color:#b7b7b7;font-size:14px;line-height:20px}
html body .ui36-library .ui36-status:empty{display:none}
html body .ui36-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;gap:16px;padding:0 16px 92px;overflow:auto;flex:1;min-height:0;align-content:start}
html body .ui36-file{position:relative;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;aspect-ratio:1;padding:16px;border:1px solid #3a3a3a;border-radius:20px;background:#000;color:#fff;min-width:0;text-align:left;cursor:pointer}
html body .ui36-file strong{font-size:15px;line-height:20px;font-weight:500;max-width:calc(100% - 24px);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
html body .ui36-file>img{width:24px;height:24px}
html body .ui36-check{position:absolute;right:16px;top:16px;width:20px;height:20px;box-sizing:border-box;border:1px solid #393939;border-radius:50%}
html body .ui36-check img{width:16px;height:16px;margin:1px;visibility:hidden;filter:brightness(0)}
html body .ui36-file[aria-pressed=true] .ui36-check{background:#fff;border-color:#fff}
html body .ui36-file[aria-pressed=true] .ui36-check img{visibility:visible}
html body .ui36-library footer{position:absolute;bottom:max(24px,env(safe-area-inset-bottom));left:34px;right:34px;display:flex;flex-direction:column;gap:10px}
html body .ui36-library footer label{display:flex;gap:10px;align-items:center;background:#141414;border:1px solid #333;border-radius:28px;padding:10px 14px;min-height:48px;box-sizing:border-box}
.ui36-library footer label img{width:22px;height:22px;opacity:.7}
html body .ui36-library input{min-width:0;width:100%;border:0;background:none;color:white;outline:none;font:400 17px/24px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;padding:0}
html body .ui36-library input::placeholder{color:#aaa}
html body .ui36-add{border:0;border-radius:25px;background:#fff;color:#000;font-size:16px;font-weight:500;padding:13px 18px}
html body :is(.ui36-library button,.ui36-round,.ui36-tab,.ui36-model):focus-visible{outline:2px solid #ddd;outline-offset:3px}
html body .ui36-library footer label:focus-within{outline:2px solid #ddd;outline-offset:2px}
@media(max-width:840px){html body .ak-shell{height:var(--ui36-height,100dvh)!important;min-height:0!important}html body .ak-topbar{min-height:66px!important;padding:8px 16px!important}html body .ui36-header-actions{display:none}html body .ui36-tabs{height:48px}html body .mobile-menu{width:44px!important;height:44px!important}html body .composer.ak-unified-mounted{width:calc(100% - 24px)!important;margin-left:12px!important;margin-right:12px!important}html body .conversation-stage{min-height:0!important}html body .message-stream{min-height:0!important}}
html body .ak-v61-composer .ui36-native-upload{display:none!important}
html body .ak-v61-composer #ak-v61-voice img{width:26px;height:26px}
html body .ui36-library:has(.ui36-add:not([hidden])) .ui36-grid{padding-bottom:150px}
/* The system status bar sits outside the web viewport. */
html body dialog.ui36-library{height:100dvh;max-height:100dvh}
html body .ui36-library header{padding:14px 16px}
html body .ui36-library .ui36-upload{padding:16px 0}
html body .ui36-library h3{margin-top:30px}
html body .ak-attachment strong{white-space:normal!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;font-size:17px!important}
html body .ak-attachment{min-width:120px!important;max-width:120px!important}
html body .ak-main{grid-template-rows:76px minmax(0,1fr)!important}
html body .ak-topbar{height:76px!important}
@media(max-width:840px){html body .ak-main{grid-template-rows:66px minmax(0,1fr)!important;height:var(--ui36-height,100dvh)!important}html body .ak-topbar{height:66px!important}}
html body .ui36-grid{scrollbar-width:none}
html body .ui36-grid::-webkit-scrollbar{display:none}
html body .ui36-library h3{margin-top:25px}
html body .ui36-library footer{bottom:max(34px,env(safe-area-inset-bottom))}
html body .ak-task-files a{white-space:normal!important;color:#f5f5f5!important;border:0!important;min-width:120px!important;max-width:120px!important;box-shadow:none!important}
html body .ak-task-files a strong{white-space:normal!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;font-size:17px!important;line-height:22px!important;color:#f5f5f5!important}
html body .ak-task-head strong{font-size:17px!important;line-height:24px!important}
html body .message-stream{scrollbar-width:none}
html body .message-stream::-webkit-scrollbar{display:none}
html body .ui36-title{display:none;position:absolute;left:50%;transform:translateX(-50%);font-size:17px;font-weight:600}
html body .ui36-conversation .ui36-tabs{display:none}
html body .ui36-conversation .ui36-title{display:block}
html body .ui36-conversation .ui36-header-actions{display:flex;border:1px solid #292929;border-radius:26px;background:#141414;padding:0 3px}
html body .ui36-conversation .ui36-header-actions .ui36-round{background:none;border:0}
html body .ui36-expanded #ak-v61-message{min-height:36px!important;padding:12px 6px 0!important}


/* interface-v37.css */
/* Attachment menu measured from the user's iPhone screenshots. */
html body .ui37-menu{position:fixed;z-index:10000;box-sizing:border-box;width:280px;padding:12px;border:1px solid #292929;border-radius:42px;background:#151515;color:#f5f5f5;box-shadow:0 0 0 1px #ffffff05,0 12px 36px #0008;overflow:auto;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
html body .ui37-menu button{display:flex;align-items:center;gap:16px;width:100%;min-height:68px;padding:8px 12px;border:0;border-radius:22px;background:transparent;color:inherit;font:400 20px/24px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;text-align:left;cursor:pointer}
html body .ui37-menu button:hover,html body .ui37-menu button:focus-visible{background:#292929;outline:none}
html body .ui37-menu button:focus-visible{box-shadow:inset 0 0 0 2px #aaa}
html body .ui37-menu-icon{display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;border-radius:50%;background:#262626}
html body .ui37-menu-icon img{display:block;width:25px;height:25px}
html body .ui37-menu[data-kind=tools]{border-radius:24px;padding:10px}
html body .ui37-menu[data-kind=tools] button{min-height:48px;gap:12px;padding:6px 10px;border-radius:12px;font-size:17px}
html body .ui37-menu[data-kind=tools] .ui37-menu-icon{flex-basis:28px;width:28px;height:28px;background:transparent}
html body .ui37-menu[data-kind=tools] .ui37-menu-icon img{width:22px;height:22px}
html body .ui37-menu-heading,html body .ui37-menu-note{font-size:13px;line-height:18px;font-weight:400;color:#aaa;margin:6px 10px 8px}
html body .ui37-menu-note{margin:10px}
html body #ui37-camera,html body #ui37-photos{display:none!important}
html body .ak-v61-composer:not(:has(.ak-attachment)){padding:6px!important;row-gap:0!important}
html body .ak-v61-composer:not(:has(.ak-attachment)) #ak-v61-message{grid-column:1/-1!important;grid-row:1!important;min-height:40px!important;padding:8px 6px!important}
html body .ak-v61-composer:not(:has(.ak-attachment)) :is(#ui36-attach,#ak-v61-voice,#ak-v61-send,#ui36-stop,.ui36-model){grid-row:2!important}
html body .ak-v61-composer:not(:has(.ak-attachment)) .ui36-model{display:flex;grid-column:2}
html body .ak-v61-composer:not(:has(.ak-attachment)).ak-settings-open .ak-mode-select{grid-row:3!important}
@media(prefers-reduced-motion:no-preference){html body .ui37-menu{animation:ui37-appear .12s ease-out}@keyframes ui37-appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}}
@media(max-width:840px){html body .ak-main{grid-template-rows:58px minmax(0,1fr)!important}html body .ak-topbar{height:58px!important;min-height:58px!important;padding-top:5px!important;padding-bottom:5px!important}}

