.phone-control,
.phone-brand {
 display: none;
}

#phone-options {
 width: min(480px, calc(100% - 24px));
 max-height: calc(100dvh - 32px);
 overflow: auto;
}

#phone-options > select {
 display: block;
 width: 100%;
 max-width: none;
 padding: 12px;
 font-size: 16px;
 margin: 12px 0;
}

#phone-options #answer-styles {
 margin: 16px 0;
}

@media (max-width: 760px) {
 html {
  height: 100%;
  overflow: hidden;
 }

 body {
  height: var(--phone-height, 100dvh);
  overflow: hidden;
 }

 main {
  min-height: 0;
 }

 main > header {
  height: calc(52px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
 }

 .phone-brand {
  display: inline;
  font-size: 18px;
  letter-spacing: -.5px;
 }

 .phone-control {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
 }

 header :is(#mode-heading, .pilot, #plan-pill, #share-chat, #export-chat, #delete-chat, #usage-shortcut) {
  display: none;
 }

 #menu {
  width: 44px;
  height: 44px;
 }

 #scroll {
  min-height: 0;
  padding: 16px 12px;
  overscroll-behavior: contain;
  scroll-padding-bottom: 16px;
 }

 #welcome {
  margin: 0;
  min-height: 100%;
  display: grid;
  place-content: center;
 }

 #welcome .welcome-brand img {
  width: 96px;
  height: auto;
 }

 #welcome h1 {
  font-size: 28px;
  letter-spacing: -.8px;
  margin: 16px 0;
 }

 #welcome :is(#suggestions, .welcome-footnote, #welcome-composer, #welcome-subtitle) {
  display: none;
 }

 main > footer {
  width: 100%;
  padding: 4px 8px max(8px, env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
  max-height: 60%;
  overflow: auto;
 }

 #notice:empty {
  display: none;
 }

 .composer-wrap {
  border-radius: 24px;
  box-shadow: none;
 }

 #composer {
  padding: 10px 8px 6px;
 }

 #input {
  display: block;
  padding: 0 8px;
  min-height: 32px;
  max-height: min(220px, 28dvh);
  font-size: 16px;
  line-height: 1.5;
 }

 .composer-toolbar {
  gap: 0;
  margin-top: 2px;
 }

 .composer-options {
  margin-right: auto;
 }

 #attachment-plus, #send, #voice-start {
  width: 44px;
  height: 44px;
  min-width: 44px;
 }

 #voice-start {
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
 }

 #phone-dictation[aria-pressed="true"] {
  color: #a43338;
  background: #fff0f0;
 }

 #composer :is(#model, #shape, #web-option, #edit-photo),
 .footer-note {
  display: none !important;
 }

 .message.user {
  font-size: 16px;
  padding: 10px 14px;
 }

 .message.assistant {
  margin: 0 0 24px;
  padding: 0;
  background: transparent;
  border-radius: 0;
 }

 .text-segment {
  font-size: 16px;
  line-height: 1.65;
 }

 #sidebar {
  max-height: var(--phone-height, 100dvh);
  overflow-y: auto;
 }
}

@media (max-width: 760px) {
 .composer-wrap > #answer-styles {
  margin: 0;
  padding: 0 10px 10px;
 }
 #answer-styles legend {
  font-size: 12px;
  margin-bottom: 5px;
 }
 .answer-style-options {
  max-width: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
 }
 .answer-style-options button {
  min-height: 44px;
  font-size: 11px;
  padding: 5px 2px;
  gap: 3px;
 }
 .answer-style-options button img {
  width: 14px;
  height: 14px;
 }
}

@media (max-width: 760px) {
 .composer-wrap > #answer-styles { padding: 0 6px 6px; }
 #answer-styles legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
 }
 .answer-style-options { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
 .answer-style-options button {
  min-height: 40px;
  padding: 3px 1px;
  font-size: clamp(8px, 2.25vw, 11px);
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow-wrap: normal;
 }
 .answer-style-options button img { display: none; }
}
