:root {
  color-scheme: dark;
  --bg: #080a0f;
  --surface: rgba(20, 24, 31, 0.78);
  --surface-2: rgba(29, 34, 43, 0.88);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f7f8fb;
  --muted: rgba(247, 248, 251, 0.58);
  --muted-2: rgba(247, 248, 251, 0.38);
  --accent: #f2bd63;
  --radius: 18px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(9, 11, 18, 0.08) 0%, rgba(9, 11, 18, 0.62) 72%, rgba(5, 6, 10, 0.96) 100%),
    linear-gradient(115deg, rgba(45, 67, 92, 0.86), rgba(126, 89, 58, 0.44) 46%, rgba(9, 12, 18, 0.94)),
    url("https://images.unsplash.com/photo-1535223289827-42f1e9919769?auto=format&fit=crop&w=2400&q=85");
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 64% 34%, rgba(255, 215, 150, 0.22), transparent 26%),
    radial-gradient(circle at 22% 72%, rgba(82, 169, 255, 0.18), transparent 32%);
  opacity: 0.95;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.app.video-ready::before {
  opacity: 0;
}

.bg-video,
.bg-wash {
  position: fixed;
  inset: 0;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
  will-change: opacity;
}

.bg-video.active {
  opacity: 0.88;
}

.app:not(.video-ready) .bg-video.active {
  opacity: 0;
}

.bg-wash {
  background:
    linear-gradient(180deg, rgba(8, 10, 15, 0.1) 0%, rgba(8, 10, 15, 0.18) 42%, rgba(8, 10, 15, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 10, 15, 0.6) 0%, rgba(8, 10, 15, 0.08) 24%, rgba(8, 10, 15, 0.22) 100%);
  pointer-events: none;
}

.rail {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 78px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 18px;
}

.logo {
  display: grid;
  width: 42px;
  height: 42px;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: #050608;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.logo span {
  width: 14px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
}

.logo span:last-child {
  margin-left: -7px;
  background: rgba(255, 255, 255, 0.86);
}

.rail-nav {
  display: grid;
  gap: 5px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 35, 43, 0.7);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(24px);
}

.rail-item {
  display: grid;
  width: 58px;
  min-height: 72px;
  place-items: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.rail-item span {
  font-size: 13px;
}

.rail-item.active,
.rail-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.rail-bottom {
  display: grid;
  place-items: center;
  gap: 13px;
}

.credit-card {
  display: grid;
  gap: 3px;
  min-width: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 18, 24, 0.68);
  padding: 7px 8px;
  text-align: left;
  backdrop-filter: blur(18px);
}

.credit-card span {
  color: #fff;
  font-size: 14px;
}

.credit-card strong {
  color: var(--accent);
  font-size: 13px;
}

.avatar {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #e9edf3;
  color: #1e2430;
  font-weight: 800;
}

.menu-button {
  display: grid;
  width: 42px;
  height: 34px;
  gap: 6px;
  align-content: center;
  border: 0;
  background: transparent;
}

.menu-button span {
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--muted);
}

.home-stage {
  position: relative;
  z-index: 10;
  display: flex;
  height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14vh 5vw 6vh 96px;
}

h1,
h2,
p {
  margin: 0;
}

.home-stage h1 {
  margin: 0 0 44px;
  color: #fff;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.34);
}

.composer {
  width: min(1000px, calc(100vw - 132px));
  min-height: 284px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(22px);
  transform: translateY(34px);
}

.prompt-wrap {
  min-height: 210px;
  padding: 20px 22px 0;
}

textarea {
  width: 100%;
  min-height: 120px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  line-height: 1.7;
  outline: none;
  resize: none;
}

textarea::placeholder {
  color: var(--muted);
}

.media-tray {
  display: flex;
  gap: 12px;
  padding: 8px 0 0;
}

.media-tile {
  position: relative;
  display: grid;
  width: 68px;
  height: 78px;
  place-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 12px;
  background: rgba(7, 9, 13, 0.34);
  transform: rotate(-4deg);
}

.media-tile:nth-child(2) {
  transform: rotate(-2deg);
}

.media-tile input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.media-tile span {
  font-size: 34px;
  line-height: 1;
}

.media-tile small {
  color: var(--muted);
}

.composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px 17px;
  background: rgba(18, 22, 29, 0.7);
}

.tool-group,
.submit-group {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tool-pill,
.icon-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  padding: 0 13px;
}

.tool-pill:hover,
.icon-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.tool-pill .chevron {
  width: 17px;
  height: 17px;
  opacity: 0.72;
}

.tool-pill span {
  white-space: nowrap;
}

.bars {
  width: 17px;
  height: 17px;
  background:
    linear-gradient(to top, currentColor 72%, transparent 72%) 0 0 / 4px 100% no-repeat,
    linear-gradient(to top, currentColor 44%, transparent 44%) 7px 0 / 4px 100% no-repeat,
    linear-gradient(to top, currentColor 88%, transparent 88%) 14px 0 / 4px 100% no-repeat;
}

.icon-button {
  width: 42px;
  justify-content: center;
  padding: 0;
  background: transparent;
}

.icon-button.active {
  color: rgba(255, 255, 255, 0.92);
}

.cost {
  min-width: 58px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  text-align: right;
}

.choice-popover {
  position: fixed;
  z-index: 60;
  width: 330px;
  max-width: calc(100vw - 24px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(22, 27, 35, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  padding: 16px;
  backdrop-filter: blur(20px);
}

.choice-popover-spec {
  width: 420px;
}

.choice-popover-type {
  width: 210px;
}

.choice-popover-reference {
  width: 230px;
}

.choice-popover-model {
  width: 560px;
}

.choice-title {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  font-weight: 800;
}

.choice-title.sub {
  margin-top: 18px;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-option,
.spec-option {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(7, 10, 15, 0.42);
  color: rgba(255, 255, 255, 0.84);
  text-align: left;
}

.choice-option {
  position: relative;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  padding: 0 14px;
  text-align: center;
}

.choice-option span,
.spec-option span {
  font-size: 16px;
  font-weight: 700;
}

.choice-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.type-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.72);
}

.type-icon.video::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 15px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.type-icon.video::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 8px;
  width: 7px;
  height: 8px;
  border: 2px solid currentColor;
  border-left: 0;
  border-radius: 2px;
}

.type-icon.image::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.type-icon.image::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 7px;
  width: 10px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.type-icon.bot::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 16px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.type-icon.bot::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 2px;
  width: 4px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: -7px 12px 0 -1px currentColor, 7px 12px 0 -1px currentColor;
}

.model-list {
  gap: 10px;
}

.model-option {
  position: relative;
  display: grid;
  min-height: 88px;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  text-align: left;
}

.model-option .model-icon {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.08);
  background-position: center;
  color: #fff;
}

.model-option .model-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.model-option strong {
  overflow: hidden;
  color: #fff;
  font-size: 21px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-option .model-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-tags {
  display: flex;
  align-self: start;
  gap: 7px;
}

.model-tags em {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  padding: 0 8px;
}

.model-option.active::after {
  content: "✓";
  position: absolute;
  right: 14px;
  top: 50%;
  color: #fff;
  font-size: 25px;
  transform: translateY(-50%);
}

.model-option.active .model-tags {
  margin-right: 34px;
}

.choice-popover-type .choice-option.active::after,
.choice-popover-reference .choice-option.active::after,
.choice-popover-sound .choice-option.active::after {
  content: "✓";
  position: absolute;
  right: 14px;
  top: 50%;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  transform: translateY(-50%);
}

.choice-option.active,
.choice-option:hover,
.spec-option.active,
.spec-option:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.spec-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ratio-icon {
  display: inline-block;
  width: 22px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 4px;
  opacity: 0.9;
}

.ratio-icon.tall {
  width: 13px;
  height: 22px;
}

.ratio-icon.square {
  width: 18px;
  height: 18px;
}

.ratio-icon.wide {
  width: 26px;
  height: 11px;
}

.send-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #cfd5df;
  color: #151920;
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.side-drawer,
.records-panel {
  position: fixed;
  z-index: 18;
  top: 34px;
  bottom: 34px;
  left: 96px;
  width: min(460px, calc(100vw - 124px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 18, 24, 0.82);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  padding: 24px;
  backdrop-filter: blur(24px);
}

.side-drawer header,
.records-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.side-drawer header span,
.records-panel header span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.side-drawer h2,
.records-panel h2,
.login-card h2 {
  font-size: 28px;
  letter-spacing: 0;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chip,
.plain-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.chip.active,
.chip:hover,
.plain-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.drawer-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 16px;
}

.drawer-card strong {
  display: block;
  margin-bottom: 8px;
}

.drawer-card p {
  color: var(--muted);
  line-height: 1.7;
}

.story-flow,
.asset-grid {
  display: grid;
  gap: 10px;
}

.story-flow div,
.asset-grid div {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 14px;
}

.story-flow b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.asset-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.records-panel {
  width: min(860px, calc(100vw - 124px));
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.record-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.record-thumb {
  display: grid;
  min-height: 150px;
  place-items: center;
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
}

.record-thumb video {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.record-body {
  padding: 12px;
}

.record-body h3 {
  min-height: 42px;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.task-overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(4px);
}

.task-card {
  width: min(760px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 19, 25, 0.92);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.4);
}

.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.task-head span {
  color: var(--muted);
}

.task-head button,
.dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.video-stage {
  display: grid;
  min-height: 360px;
  place-items: center;
  background: #050608;
}

.video-stage video {
  width: 100%;
  max-height: 64vh;
  object-fit: contain;
}

.empty-state {
  max-width: 280px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.progress-wrap {
  height: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #eef2f7, var(--accent));
  transition: width 0.3s ease;
}

.login-page {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border: 0;
  padding: 0;
  background: #10151d;
  color: var(--text);
}

.login-page::backdrop {
  background: #10151d;
}

.login-page[open] {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 26% 24%, rgba(72, 109, 133, 0.34), transparent 34%),
    linear-gradient(135deg, #071018, #111821 52%, #05070a);
}

.login-visual video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.86) contrast(1.08);
  transition: opacity 1.4s ease;
  will-change: opacity;
}

.login-visual video.active {
  opacity: 0.64;
}

.login-visual div {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.1) 0%, rgba(16, 21, 29, 0.56) 100%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.12) 0%, rgba(5, 7, 10, 0.42) 100%);
}

.login-form {
  position: relative;
  display: flex;
  width: min(440px, calc(100% - 56px));
  flex-direction: column;
  justify-content: center;
  justify-self: center;
  gap: 18px;
  padding: 24px 0;
}

.login-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.login-tab {
  min-width: 58px;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
}

.login-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.login-form label {
  display: grid;
  gap: 9px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.login-form input {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(74, 88, 112, 0.38);
  color: var(--text);
  outline: none;
  padding: 0 13px;
  font-size: 17px;
}

.login-form input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.code-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.code-row button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  white-space: nowrap;
}

.code-row button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.dialog-close {
  position: absolute;
  top: 22px;
  right: 0;
}

.login-submit {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #eef0f4;
  color: #141922;
  font-weight: 800;
  font-size: 18px;
}

.agreement-line {
  margin-top: 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
}

.agreement-line button {
  border: 0;
  background: transparent;
  color: #dbe7ff;
  font-size: inherit;
  text-decoration: underline;
}

.agreement-line button:hover {
  color: #fff;
}

.policy-dialog {
  width: min(760px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 36px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.policy-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.policy-card {
  position: relative;
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 21, 29, 0.98);
  padding: 28px;
}

.policy-card h2 {
  margin: 0 0 18px;
}

.policy-content {
  display: grid;
  gap: 12px;
  color: rgba(247, 248, 251, 0.78);
  line-height: 1.8;
}

.policy-content h3 {
  margin: 8px 0 0;
  color: #fff;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 18, 24, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app {
    min-height: 100vh;
    height: auto;
    overflow: min(visible, auto);
  }

  .rail {
    right: 12px;
    bottom: 12px;
    left: 12px;
    top: auto;
    width: auto;
    height: 74px;
    flex-direction: row;
    padding: 0;
    pointer-events: none;
  }

  .logo,
  .rail-bottom {
    display: none;
  }

  .rail-nav {
    width: 100%;
    grid-template-columns: repeat(5, 1fr);
    pointer-events: auto;
  }

  .rail-item {
    width: auto;
    min-height: 56px;
  }

  .rail-item span {
    font-size: 11px;
  }

  .home-stage {
    min-height: 100vh;
    height: auto;
    padding: 15vh 14px 110px;
  }

  .composer {
    width: 100%;
  }

  .composer-tools,
  .tool-group {
    flex-wrap: wrap;
  }

  .submit-group {
    width: 100%;
    justify-content: flex-end;
  }

  .side-drawer,
  .records-panel {
    top: 14px;
    right: 14px;
    bottom: 96px;
    left: 14px;
    width: auto;
  }

  .records-grid {
    grid-template-columns: 1fr;
  }

  .login-page[open] {
    grid-template-columns: 1fr;
  }

  .login-visual {
    position: absolute;
    inset: 0;
  }

  .login-form {
    z-index: 1;
    width: min(430px, calc(100vw - 36px));
  }
}
