/* New chat home: aurora backdrop, greeting, composer, start cards, templates and shortcuts. */
.view-new { position: relative; isolation: isolate; }
.aurora { position: absolute; inset: 0 0 auto; height: 620px; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; animation: float 18s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 460px; height: 340px; left: 12%; top: -120px; background: var(--b1); }
.aurora span:nth-child(2) { width: 420px; height: 320px; left: 42%; top: -160px; background: var(--b2); animation-duration: 22s; }
.aurora span:nth-child(3) { width: 380px; height: 300px; right: 8%; top: -80px; background: var(--b3); animation-duration: 26s; }
.aurora::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--bg)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .aurora span { opacity: .28; } }
:root[data-theme="dark"] .aurora span { opacity: .28; }
@keyframes float { to { transform: translate(60px, 50px) scale(1.12); } }

.home { max-width: 860px; margin: 0 auto; padding: 12vh 28px 80px; display: flex; flex-direction: column; gap: 22px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 6px; }
.hero .orb { width: 56px; height: 56px; margin-bottom: 14px; }
.greeting { font-family: var(--display); font-size: 54px; line-height: 1.05; margin: 0; font-weight: 700; letter-spacing: -.035em; }
.subhead { font-family: var(--display); font-size: 26px; margin: 4px 0 0; color: var(--muted); font-weight: 500; letter-spacing: -.02em; }

/* Composer with a rotating brand ring while focused (Gemini style) */
.composer-box {
  position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--card); border-radius: 28px;
  padding: 16px 14px 12px 22px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); transition: box-shadow .25s var(--ease);
}
.composer-box::before {
  content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: 29.5px; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from var(--angle), var(--b1), var(--b2), var(--b3), var(--b1)); animation: ring 4s linear infinite;
}
.composer-box:focus-within { box-shadow: var(--shadow-lg); }
.composer-box:focus-within::before, .composer-box.busy::before { opacity: 1; }
@keyframes ring { to { --angle: 360deg; } }
.composer-box textarea { border: 0; padding: 4px 0; resize: none; background: transparent; box-shadow: none; font-size: 17px; line-height: 1.55; max-height: 240px; min-height: 54px; }
.composer-box textarea::placeholder { color: var(--muted); }
.composer-row { display: flex; align-items: center; gap: 6px; }
.tool {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px;
  background: var(--raise); color: var(--ink-2); border: 0; font-size: 13.5px; font-weight: 500; box-shadow: none; cursor: pointer;
}
.tool:hover { background: var(--hover); color: var(--ink); box-shadow: none; }

/* Website line above the composer (Codex style): logo, site, chevron; the menu switches website */
.composer-stack { display: flex; flex-direction: column; gap: 8px; }
.site-picker { position: relative; align-self: flex-start; max-width: 100%; z-index: 31; }
.site-current {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; height: 30px; padding: 0 9px 0 6px; border-radius: 9px;
  background: transparent; color: var(--ink-2); border: 0; box-shadow: none; font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.site-current:hover, .site-current[aria-expanded="true"] { background: var(--hover); color: var(--ink); box-shadow: none; }
.site-current .icon-chevron { width: 13px; height: 13px; transform: rotate(90deg); color: var(--muted); stroke-width: 2.2; }
.site-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-mark { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; overflow: hidden; flex: none; background: var(--raise); color: var(--muted); }
.site-mark img { width: 100%; height: 100%; object-fit: cover; }
.site-mark .icon { width: 13px; height: 13px; }
.site-menu {
  position: absolute; left: 0; top: calc(100% + 6px); width: min(320px, 86vw); max-height: 340px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .14s var(--ease);
}
.site-menu[hidden] { display: none; }
.site-menu-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px 4px; }
.site-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; justify-content: flex-start;
  background: transparent; color: var(--ink); border: 0; border-radius: 10px; padding: 8px 10px; font-weight: 400; box-shadow: none;
}
.site-item:hover, .site-item:focus-visible { background: var(--hover); box-shadow: none; outline: none; }
.site-item .site-mark { width: 26px; height: 26px; border-radius: 7px; }
.site-item .site-mark .icon { width: 15px; height: 15px; }
.site-item > .icon-check { width: 16px; height: 16px; margin-left: auto; color: var(--ink); }
.site-text { display: flex; flex-direction: column; min-width: 0; }
.site-text strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-new { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }

.send { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--b2) 40%, transparent); }
.send .icon { width: 19px; height: 19px; stroke-width: 2.2; }
.send:disabled { background: var(--raise); color: var(--muted); opacity: 1; }
.shortcut-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); max-height: 380px; overflow-y: auto; z-index: 30;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .16s var(--ease);
}
.shortcut-menu[hidden] { display: none; }
.home .shortcut-menu { bottom: auto; top: calc(100% + 10px); }
.menu-group { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 12px 12px 4px; }
.shortcut-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; justify-content: flex-start;
  background: transparent; color: var(--ink); border-radius: 12px; padding: 8px 10px; font-weight: 400; box-shadow: none;
}
.shortcut-menu button.selected, .shortcut-menu button:hover { background: var(--hover); box-shadow: none; }
.menu-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; flex: none; }
.menu-icon .icon { width: 17px; height: 17px; }
.menu-text { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; min-width: 0; font-size: 14px; align-items: baseline; }
.menu-text strong { font-weight: 600; }
.menu-text code { font-size: 12px; color: var(--muted); }
.menu-text small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 5px 6px 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--b2) 14%, transparent); color: var(--ink); }
.focus-clear { width: 22px; height: 22px; padding: 0; background: transparent; color: var(--muted); box-shadow: none; }

/* Start cards in the app's tool colours */
.starts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 4px; }
.start-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 2px;
  height: 136px; padding: 14px; border-radius: 20px; color: #fff; text-align: left; font-weight: 400; border: 0;
  background: var(--hue); box-shadow: 0 10px 26px color-mix(in srgb, var(--hue-shadow) 30%, transparent);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.start-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px color-mix(in srgb, var(--hue-shadow) 40%, transparent); }
.start-card::before { content: ""; position: absolute; width: 110px; height: 110px; right: -28px; top: -34px; border-radius: 50%; background: rgba(255, 255, 255, .22); filter: blur(14px); transition: transform .5s var(--ease); }
.start-card:hover::before { transform: translate(-10px, 10px) scale(1.15); }
.start-card .glyph { position: absolute; top: 14px; left: 14px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.start-card .glyph .icon { width: 20px; height: 20px; stroke-width: 2; }
.start-card strong { font-size: 15px; letter-spacing: -.01em; }
.start-card small { font-size: 12px; opacity: .85; line-height: 1.35; }

.home-section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-family: var(--display); font-size: 21px; letter-spacing: -.02em; }
.section-head a { color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.section-head a:hover { color: var(--ink); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 14px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail > * { scroll-snap-align: start; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; }
.tabs button { background: var(--raise); color: var(--ink-2); border: 0; font-weight: 500; white-space: nowrap; padding: 8px 15px; box-shadow: none; }
.tabs button:hover { background: var(--hover); box-shadow: none; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }

/* Template posters: full-bleed, title on the image */
.template-card { position: relative; display: block; padding: 0; border: 0; background: var(--raise); color: #fff; text-align: left; border-radius: 22px; overflow: hidden; font-weight: 400; aspect-ratio: 9 / 16; box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.template-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.template-art, .template-art img, .template-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.template-art img { transition: transform .6s var(--ease); }
.template-card:hover .template-art img { transform: scale(1.05); }
.template-art video { opacity: 0; transition: opacity .3s; }
.template-card:hover .template-art video { opacity: 1; }
.template-blank { position: absolute; inset: 0; display: grid; place-items: center; background: var(--brand); }
.template-card::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); pointer-events: none; }
.template-label { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 3px; padding: 14px; }
.template-label strong { font-size: 15px; letter-spacing: -.01em; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.template-label small { font-size: 12px; opacity: .8; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.trend { position: absolute; z-index: 1; top: 10px; left: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: calc(100% - 20px); font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 999px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(10px); color: #ffb26b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend .icon { width: 12px; height: 12px; flex: none; }
.play-badge { position: absolute; z-index: 1; top: 50%; left: 50%; display: grid; place-items: center; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(255, 255, 255, .25); backdrop-filter: blur(10px); opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s var(--ease); }
.play-badge .icon { width: 18px; height: 18px; fill: #fff; stroke: none; margin-left: 2px; }
.template-card:hover .play-badge { opacity: 1; transform: none; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }

.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.shortcut-card {
  display: flex; align-items: center; gap: 14px; text-align: left; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px; padding: 14px; font-weight: 400; box-shadow: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.shortcut-card:hover { transform: translateY(-2px); border-color: transparent; box-shadow: var(--shadow); }
.shortcut-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; flex: none; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.shortcut-icon .icon { width: 20px; height: 20px; stroke-width: 2; }
.shortcut-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shortcut-text strong { font-size: 14.5px; }
.shortcut-text small { color: var(--muted); font-size: 12.5px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

@media (max-width: 860px) {
  .home { padding: 80px 18px 50px; }
  .greeting { font-size: 40px; }
  .subhead { font-size: 21px; }
  .starts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .tool > span { display: none; }
  .tool { padding: 0 11px; }
}
