:root {
  color-scheme: light;
  --canvas: #f7f7f5;
  --canvas-deep: #ececea;
  --ink: #171717;
  --quiet: #666461;
  --line: rgba(43, 42, 40, 0.24);
  --other: #ffffff;
  --self: #e7e8e9;
  --accent: #4fae5b;
  --accent-dark: #2f7540;
  --bubble-border: rgba(45, 44, 42, 0.68);
  --field: rgba(255, 255, 255, 0.74);
  --danger: #b44a42;
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI",
    "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #1f1f1f;
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
.message-row {
  -webkit-tap-highlight-color: transparent;
}

.stage {
  min-height: 100dvh;
}

.phone {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--canvas);
}

.app-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 94%, white);
  box-shadow: 0 1px 5px rgba(63, 48, 42, 0.08);
}

.status-bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 54px;
  padding:
    max(6px, env(safe-area-inset-top))
    max(15px, env(safe-area-inset-right)) 5px
    max(15px, env(safe-area-inset-left));
  cursor: pointer;
}

.status-bar-hit-area {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.status-bar-hit-area:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: -4px;
}

.status-time {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-self: start;
  min-width: 58px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  pointer-events: none;
}

.status-time.is-hidden span {
  color: transparent;
}

.status-time:focus-visible,
.contact-button:focus-visible,
.avatar-button:focus-visible,
.message-bubble:focus-visible,
.message-meta:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 2px;
}

.status-icons {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.signal-bars {
  display: flex;
  height: 16px;
  align-items: flex-end;
  gap: 2px;
}

.signal-bars i {
  display: block;
  width: 3px;
  border-radius: 2px 2px 0 0;
  background: currentColor;
}

.signal-bars i:nth-child(1) {
  height: 5px;
}

.signal-bars i:nth-child(2) {
  height: 8px;
}

.signal-bars i:nth-child(3) {
  height: 11px;
}

.signal-bars i:nth-child(4) {
  height: 15px;
}

.network-label {
  font-size: 11px;
  letter-spacing: -0.03em;
}

.battery-button {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0 5px 0 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.battery {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

.battery::after {
  position: absolute;
  top: 3px;
  right: -4px;
  width: 2px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: currentColor;
  content: "";
}

.battery i {
  display: block;
  height: 100%;
  border: 2px solid transparent;
  border-radius: 3px;
  background: currentColor;
  background-clip: padding-box;
}

.chat-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 56px;
  gap: 8px;
  padding: 3px 10px 7px;
}

.icon-button,
.contact-button,
.settings-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 54px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--quiet);
}

.back-button span {
  font-family: Georgia, serif;
  font-size: 46px;
  font-weight: 300;
  line-height: 0.7;
}

.back-button b {
  font-size: 17px;
}

.contact-button {
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
  overflow: hidden;
  color: var(--quiet);
  font-size: 19px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  gap: 5px;
}

.header-actions > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--field);
  color: var(--quiet);
  font-size: 20px;
}

.search-glyph {
  position: relative;
  display: block;
  width: 23px;
  height: 23px;
}

.search-glyph::before {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
}

.search-glyph::after {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.settings-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--field);
  color: var(--quiet);
}

.settings-button i {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.messages {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 22px 12px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 28%),
    var(--canvas);
  scroll-behavior: smooth;
}

.messages.has-background-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.message-row {
  display: flex;
  width: 100%;
  margin: 0 0 13px;
  align-items: flex-end;
  gap: 7px;
  max-height: 400px;
  opacity: 1;
  touch-action: pan-y;
  transition:
    max-height 220ms ease,
    margin 220ms ease,
    opacity 180ms ease,
    transform 220ms ease;
}

.message-date-divider {
  width: max-content;
  max-width: 100%;
  margin: 7px auto 16px;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--canvas-deep) 84%, transparent);
  color: var(--quiet);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04);
}

.message-row.self {
  justify-content: flex-end;
}

.message-row.other {
  justify-content: flex-start;
}

.message-content {
  display: flex;
  max-width: calc(100% - 48px);
  align-items: flex-end;
  gap: 7px;
  transition: transform 160ms ease;
  will-change: transform;
}

.message-row.is-dragging .message-content {
  transition: none;
}

.message-row.is-removing {
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  opacity: 0;
  transform: scale(0.92);
}

.message-row.other .message-content {
  flex-direction: row;
}

.message-row.self .message-content {
  flex-direction: row-reverse;
}

.avatar-button {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(69, 52, 45, 0.18);
  border-radius: 50%;
  background: color-mix(in srgb, var(--canvas-deep) 82%, var(--other));
  color: var(--quiet);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.avatar-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-bubble {
  position: relative;
  max-width: min(280px, 77vw);
  min-width: 44px;
  padding: 9px 13px 10px;
  border: 1.25px solid var(--bubble-border);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.48;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: pointer;
  -webkit-touch-callout: none;
  user-select: none;
  transition:
    transform 130ms ease,
    filter 130ms ease;
}

.message-bubble.is-pressing {
  filter: brightness(0.96);
  transform: scale(0.975);
}

.message-row.other .message-bubble {
  border-radius: 8px 19px 19px 19px;
  background: var(--other);
}

.message-row.self .message-bubble {
  border-radius: 19px 8px 19px 19px;
  background: var(--self);
}

.message-bubble::before {
  position: absolute;
  top: -1.25px;
  width: 11px;
  height: 11px;
  border-top: 1.25px solid var(--bubble-border);
  background: inherit;
  content: "";
}

.message-row.other .message-bubble::before {
  left: -6px;
  border-left: 1.25px solid var(--bubble-border);
  border-top-left-radius: 3px;
  transform: skewX(34deg);
}

.message-row.self .message-bubble::before {
  right: -6px;
  border-right: 1.25px solid var(--bubble-border);
  border-top-right-radius: 3px;
  transform: skewX(-34deg);
}

.message-meta {
  min-width: 42px;
  padding: 4px 0 3px;
  border: 0;
  background: transparent;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.message-meta .read-mark {
  display: block;
  min-height: 13px;
}

.composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 9px max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas-deep) 94%, white);
}

.composer-plus,
.send-button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.composer-plus {
  background: transparent;
  color: var(--quiet);
  font-size: 34px;
  font-weight: 300;
}

.composer-field {
  display: block;
}

.composer textarea {
  display: block;
  width: 100%;
  max-height: 112px;
  resize: none;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  outline: none;
  background: var(--field);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.composer textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 182, 87, 0.17);
}

.send-button {
  padding: 0 13px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.editor-dialog {
  width: min(calc(100% - 28px), 390px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fffdfa;
  color: #211e1b;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.32);
}

.editor-dialog::backdrop {
  background: rgba(19, 16, 14, 0.55);
  backdrop-filter: blur(4px);
}

.editor-dialog form {
  display: grid;
  gap: 17px;
  padding: 22px;
}

.dialog-heading {
  display: grid;
  gap: 3px;
}

.dialog-kicker {
  margin: 0;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 23px;
}

.editor-dialog label,
.editor-dialog fieldset {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 13px;
  font-weight: 700;
}

.editor-dialog legend {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
}

.editor-dialog input[type="text"],
.editor-dialog input[type="number"],
.editor-dialog input[type="time"],
.editor-dialog input:not([type]),
.editor-dialog select,
.editor-dialog textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(75, 63, 58, 0.3);
  border-radius: 10px;
  background: #f7f2eb;
  color: #211e1b;
  font-size: 16px;
  font-weight: 500;
}

.editor-dialog textarea {
  resize: vertical;
  line-height: 1.55;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.check-row input {
  width: 21px;
  height: 21px;
  accent-color: var(--accent);
}

.check-row.is-disabled {
  opacity: 0.42;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: #eee7de;
}

.segmented-control label {
  position: relative;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  min-height: 40px;
  place-items: center;
  border-radius: 9px;
  font-size: 14px;
}

.segmented-control input:checked + span {
  background: white;
  color: var(--accent-dark);
  box-shadow: 0 2px 8px rgba(54, 43, 38, 0.12);
}

.dialog-note {
  margin: -6px 0 0;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.dialog-actions-spread {
  align-items: center;
  justify-content: space-between;
}

.dialog-actions-spread span {
  display: flex;
  gap: 8px;
}

.dialog-actions button {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: #eee8e0;
  cursor: pointer;
}

.dialog-actions .primary {
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.dialog-actions .danger {
  background: transparent;
  color: var(--danger);
  font-weight: 700;
}

.editor-dialog button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.settings-dialog {
  width: min(calc(100% - 28px), 430px);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.theme-choice {
  position: relative;
}

.theme-choice input {
  position: absolute;
  opacity: 0;
}

.theme-choice span {
  display: grid;
  min-height: 67px;
  place-items: center;
  gap: 4px;
  padding: 8px 3px 6px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #f4efe8;
  font-size: 11px;
  text-align: center;
}

.theme-choice span i {
  display: block;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(32, 28, 25, 0.2);
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px var(--swatch-inner);
  background: var(--swatch);
}

.theme-choice input:checked + span {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 3px 12px rgba(54, 43, 38, 0.12);
}

.theme-white {
  --swatch: #f7f7f5;
  --swatch-inner: #e7e8e9;
}

.theme-cream {
  --swatch: #efe7dc;
  --swatch-inner: #e9e7df;
}

.theme-blue {
  --swatch: #e7f0f7;
  --swatch-inner: #cfe2f0;
}

.theme-green {
  --swatch: #e8f1e7;
  --swatch-inner: #d1e4ce;
}

.theme-yellow {
  --swatch: #f8f0ce;
  --swatch-inner: #f0df98;
}

.theme-red {
  --swatch: #f4e7e6;
  --swatch-inner: #eccdca;
}

.theme-brown {
  --swatch: #ece3d9;
  --swatch-inner: #d9c2ab;
}

.theme-black {
  --swatch: #181a1d;
  --swatch-inner: #3a424a;
}

.background-settings {
  padding-top: 4px !important;
}

.background-settings > p {
  margin: 0;
  color: #76645a;
  font-size: 12px;
  font-weight: 500;
}

.background-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.background-actions button {
  min-height: 42px;
  padding: 5px 8px;
  border: 0;
  border-radius: 10px;
  background: #eee8e0;
  color: #2b2724;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.background-actions .danger {
  color: var(--danger);
}

.account-settings {
  padding-top: 4px !important;
}

.account-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-settings-row p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #76645a;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-settings-row button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 5px 11px;
  border: 0;
  border-radius: 10px;
  background: #eee8e0;
  color: #2b2724;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.crop-dialog {
  width: min(calc(100% - 28px), 420px);
}

.crop-frame {
  position: relative;
  width: min(100%, 250px);
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid rgba(35, 31, 28, 0.72);
  background:
    linear-gradient(45deg, #d9d5d0 25%, transparent 25%),
    linear-gradient(-45deg, #d9d5d0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9d5d0 75%),
    linear-gradient(-45deg, transparent 75%, #d9d5d0 75%),
    #eeece9;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
  cursor: grab;
  touch-action: none;
}

.crop-frame.is-avatar {
  aspect-ratio: 1;
  border-radius: 50%;
}

.crop-frame.is-background {
  width: min(100%, 220px);
  aspect-ratio: 13 / 20;
  border-radius: 14px;
}

.crop-frame.is-dragging {
  cursor: grabbing;
}

.crop-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: none;
  pointer-events: none;
  transform: translate(
      calc(-50% + var(--crop-x, 0px)),
      calc(-50% + var(--crop-y, 0px))
    )
    scale(var(--crop-scale, 1));
  transform-origin: center;
  user-select: none;
}

.crop-frame > span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.range-field > span {
  display: flex;
  justify-content: space-between;
}

.range-field input {
  width: 100%;
  accent-color: var(--accent);
}

.message-action-layer {
  position: fixed;
  z-index: 70;
  inset: 0;
}

.message-action-layer[hidden] {
  display: none;
}

.message-action-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(18, 17, 16, 0.24);
  backdrop-filter: blur(1.5px);
}

.message-action-menu {
  position: fixed;
  display: grid;
  width: min(288px, calc(100vw - 24px));
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(37, 37, 38, 0.97);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.38);
}

.message-action-menu button {
  display: grid;
  min-width: 0;
  min-height: 84px;
  place-items: center;
  gap: 7px;
  padding: 10px 5px 9px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  color: #f2f2f2;
  cursor: pointer;
}

.message-action-menu button:last-child {
  border-right: 0;
}

.message-action-menu button:active {
  background: rgba(255, 255, 255, 0.1);
}

.message-action-menu span {
  font-family: Arial, sans-serif;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.message-action-menu b {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.license-watermark {
  position: absolute;
  z-index: 24;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0.065;
  pointer-events: none;
  user-select: none;
}

.license-watermark[hidden] {
  display: none;
}

.license-watermark-mark {
  display: block;
  width: 128%;
  aspect-ratio: 2400 / 1027;
  background: var(--ink);
  -webkit-mask:
    url("./assets/gamenshi-wordmark-watermark.png") center / contain
    no-repeat;
  mask:
    url("./assets/gamenshi-wordmark-watermark.png") center / contain
    no-repeat;
  transform: rotate(-27deg);
}

.license-gate {
  position: absolute;
  z-index: 36;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  color: var(--ink);
  text-align: center;
  backdrop-filter: blur(8px);
}

.license-gate[hidden] {
  display: none;
}

.license-gate > div {
  display: grid;
  width: min(100%, 320px);
  gap: 12px;
  padding: 25px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--canvas-deep) 91%, white);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.license-gate p,
.license-gate h1 {
  margin: 0;
}

.license-gate p:first-child {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.license-gate h1 {
  font-size: 22px;
  line-height: 1.45;
}

.license-gate #license-gate-text {
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.75;
}

.license-gate a {
  display: grid;
  min-height: 44px;
  margin-top: 4px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.license-gate a[hidden] {
  display: none;
}

.local-preview-badge {
  position: absolute;
  z-index: 32;
  right: 10px;
  bottom: 76px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(20, 19, 18, 0.76);
  color: white;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.local-preview-badge[hidden] {
  display: none;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(25, 23, 21, 0.9);
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (min-width: 560px) {
  .stage {
    display: grid;
    place-items: center;
    padding: 28px;
  }

  .phone {
    width: 390px;
    min-height: min(844px, calc(100dvh - 56px));
    height: min(844px, calc(100dvh - 56px));
    border: 8px solid #0b0b0b;
    border-radius: 38px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  }

  .status-bar {
    padding-top: 6px;
  }
}

@media (max-width: 380px) {
  .header-actions span:nth-child(2) {
    display: none;
  }

  .message-bubble {
    font-size: 16px;
  }

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

  .background-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
