:root {
  color-scheme: light;
  --page: #f6f7f9;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-muted: #f8fafc;
  --surface-tint: #f2f7f6;
  --ink: #20242d;
  --ink-soft: #3a414f;
  --muted: #6f7785;
  --muted-light: #9aa3af;
  --line: #dde3ec;
  --line-soft: #edf0f5;
  --line-strong: #bcc6d3;
  --accent: #4d74d8;
  --teal: #4aa79b;
  --coral: #cf8b75;
  --amber: #d4b36f;
  --focus: rgba(77, 116, 216, 0.18);
  --shadow-panel:
    0 24px 70px rgba(32, 36, 45, 0.08),
    0 8px 24px rgba(32, 36, 45, 0.05);
  --shadow-soft: 0 14px 34px rgba(32, 36, 45, 0.065);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

html {
  background: var(--page);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 22% 12%, rgba(207, 139, 117, 0.12), transparent 26%),
    radial-gradient(circle at 88% 20%, rgba(74, 167, 155, 0.1), transparent 27%),
    linear-gradient(180deg, #fafbfc 0%, #f6f7f9 48%, #eef3f2 100%);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(32, 36, 45, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 36, 45, 0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.76), transparent 82%);
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

.studio-shell {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 100svh;
}

.side-rail {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 22px;
  height: 100svh;
  padding: 20px 10px;
  border-right: 1px solid rgba(221, 227, 236, 0.82);
  background: rgba(250, 251, 252, 0.82);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(1.04);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(188, 198, 211, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 246, 0.86)),
    #fff;
  box-shadow: var(--shadow-soft), var(--inner);
}

.brand-mark span {
  width: 18px;
  height: 18px;
  border-radius: 6px 6px 6px 1px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  transform: rotate(45deg);
}

.rail-nav {
  display: grid;
  align-content: start;
  gap: 14px;
  width: 100%;
}

.rail-item {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
}

.rail-item:hover,
.rail-item.is-active {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: var(--inner), 0 8px 20px rgba(32, 36, 45, 0.045);
}

.rail-icon {
  position: relative;
  display: block;
  width: 19px;
  height: 19px;
}

.rail-icon-generate {
  border: 2px solid currentColor;
  border-radius: 5px;
  transform: rotate(45deg);
}

.rail-status {
  writing-mode: vertical-rl;
  max-height: 112px;
  padding: 10px 6px;
  overflow: hidden;
  border: 1px solid rgba(74, 167, 155, 0.24);
  border-radius: 999px;
  background: rgba(242, 247, 246, 0.9);
  color: #327f75;
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  min-width: 0;
  padding: clamp(20px, 2.4vw, 38px);
}

.hero-panel {
  display: grid;
  justify-items: center;
  gap: 9px;
  width: min(100%, 1060px);
  margin: 0 auto 24px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before,
.section-kicker::before {
  display: inline-block;
  width: 24px;
  height: 3px;
  margin-right: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--teal), var(--accent));
  content: "";
  vertical-align: middle;
  opacity: 0.7;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(34px, 4.2vw, 58px);
  font-weight: 920;
}

h2 {
  font-size: 18px;
  font-weight: 880;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  align-items: start;
  gap: 18px;
  width: min(100%, 1420px);
  margin: 0 auto;
}

.creation-pane {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.composer-card,
.setting-panel,
.result-panel {
  border: 1px solid rgba(221, 227, 236, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    var(--surface);
  box-shadow: var(--shadow-panel), var(--inner);
  backdrop-filter: blur(18px) saturate(1.03);
}

.composer-card {
  display: grid;
  gap: 15px;
  padding: 18px;
}

#copyInput {
  min-height: clamp(140px, 21svh, 220px);
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 760;
  line-height: 1.55;
  resize: vertical;
}

#copyInput:focus {
  box-shadow: none;
}

.composer-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.composer-input,
.tool-chip,
.custom-ratio-fields label,
.requirements-panel {
  min-width: 0;
}

.composer-input,
.tool-chip,
.custom-ratio-fields label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 780;
}

.composer-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  color: var(--ink);
  box-shadow: var(--inner);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

input,
select {
  height: 40px;
  padding: 0 12px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  background-position:
    calc(100% - 16px) 18px,
    calc(100% - 11px) 18px,
    0 0;
  background-size:
    5px 5px,
    5px 5px,
    100% 100%;
  background-repeat: no-repeat;
  padding-right: 32px;
}

textarea {
  padding: 12px 13px;
  resize: vertical;
}

#extraInput {
  min-height: 112px;
  font-size: 14px;
  line-height: 1.55;
}

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

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible {
  border-color: var(--accent);
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

input:focus,
select:focus,
textarea:focus {
  background: #ffffff;
  box-shadow:
    var(--inner),
    0 0 0 4px rgba(77, 116, 216, 0.08),
    0 12px 28px rgba(32, 36, 45, 0.06);
}

.tool-chip {
  width: auto;
}

.primary-action,
.secondary-action {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 850;
  letter-spacing: 0;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.primary-action {
  min-width: 112px;
  border: 1px solid rgba(32, 36, 45, 0.92);
  background: linear-gradient(180deg, #303745, #20242d);
  color: #ffffff;
  box-shadow:
    0 16px 34px rgba(32, 36, 45, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.primary-action:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 42px rgba(32, 36, 45, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.primary-action:disabled {
  cursor: progress;
  opacity: 0.68;
  transform: none;
}

.secondary-action {
  min-width: 86px;
  padding: 0 15px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  color: var(--ink);
  box-shadow: var(--shadow-soft), var(--inner);
}

.secondary-action:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: #ffffff;
}

.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.settings-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.setting-panel {
  min-width: 0;
  padding: 16px;
}

.requirements-panel {
  grid-column: auto;
  grid-row: auto;
  align-self: stretch;
}

.panel-head,
.result-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

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

.option-button {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 22px rgba(32, 36, 45, 0.045), var(--inner);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.option-button::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.6), transparent 42%),
    linear-gradient(90deg, transparent, rgba(74, 167, 155, 0.055), transparent);
  content: "";
  opacity: 0;
  transition: opacity 160ms ease;
}

.option-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow:
    0 14px 30px rgba(32, 36, 45, 0.08),
    var(--inner);
}

.option-button:hover::before {
  opacity: 1;
}

.option-button[aria-pressed="true"] {
  border-color: rgba(74, 167, 155, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 246, 0.96));
  box-shadow:
    0 14px 30px rgba(74, 167, 155, 0.1),
    inset 0 0 0 1px rgba(74, 167, 155, 0.15),
    var(--inner);
}

.option-button[aria-pressed="true"]::before {
  opacity: 1;
}

.option-button[aria-pressed="true"]::after {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(74, 167, 155, 0.1);
  content: "";
}

.option-visual,
.option-copy {
  position: relative;
  z-index: 1;
}

.option-copy {
  min-width: 0;
}

.option-visual {
  width: 34px;
  height: 42px;
  border: 1px solid rgba(32, 36, 45, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #cf8b75, #4d74d8),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -10px 20px rgba(32, 36, 45, 0.1),
    0 8px 16px rgba(32, 36, 45, 0.1);
}

.option-visual::before {
  position: absolute;
  top: 5px;
  right: 5px;
  left: 5px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  content: "";
}

.option-visual::after {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  height: 4px;
  border-radius: 999px;
  background: rgba(32, 36, 45, 0.14);
  content: "";
}

.option-button[data-option-id="xhs"] .option-visual {
  background: linear-gradient(145deg, #d9897a, #e2ae78 54%, #d8c783);
}

.option-button[data-option-id="photo"] .option-visual {
  background: linear-gradient(145deg, #303846, #738095 58%, #d7dee8);
}

.option-button[data-option-id="poster"] .option-visual {
  background: linear-gradient(145deg, #4aa79b, #79b889 58%, #d4b36f);
}

.option-button[data-option-id="minimal"] .option-visual {
  background: linear-gradient(145deg, #ffffff, #edf1f6);
}

.option-button[data-option-id="illustration"] .option-visual {
  background:
    radial-gradient(circle at 30% 35%, #fffdf7 0 10%, transparent 11%),
    linear-gradient(145deg, #cf8b75, #d4b36f 48%, #74b8ae);
}

.option-button[data-option-id="3d"] .option-visual {
  background: linear-gradient(145deg, #8a7cc0, #5d82ce 50%, #64b6ac);
}

.option-grid-compact .option-button {
  grid-template-columns: 1fr;
  align-content: center;
  min-height: 70px;
}

.option-grid-compact .option-visual {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--teal), var(--accent));
  box-shadow: 0 6px 14px rgba(77, 116, 216, 0.12);
}

.option-grid-compact .option-visual::before,
.option-grid-compact .option-visual::after {
  display: none;
}

.option-name,
.option-meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 860;
}

.option-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.custom-ratio-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}

.custom-ratio-separator {
  padding-bottom: 10px;
  color: var(--muted);
  font-weight: 850;
}

.result-panel {
  position: sticky;
  top: clamp(20px, 2.4vw, 38px);
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto auto;
  min-width: 0;
  max-height: calc(100svh - clamp(40px, 4.8vw, 76px));
  padding: 16px;
}

.image-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(188, 198, 211, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 252, 0.94)),
    linear-gradient(90deg, rgba(32, 36, 45, 0.026) 1px, transparent 1px),
    linear-gradient(rgba(32, 36, 45, 0.024) 1px, transparent 1px);
  background-size:
    100% 100%,
    30px 30px,
    30px 30px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.image-stage::before {
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(111, 119, 133, 0.28);
  border-radius: 8px;
  content: "";
  pointer-events: none;
}

.image-stage::after {
  position: absolute;
  right: 12%;
  bottom: 9%;
  left: 12%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(77, 116, 216, 0.34), rgba(74, 167, 155, 0.28), transparent);
  content: "";
  pointer-events: none;
}

.empty-state {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 9px;
  width: min(82%, 310px);
  padding: 14px;
  color: var(--muted);
  text-align: center;
}

.empty-preview {
  position: relative;
  width: min(100%, 236px);
  aspect-ratio: 3 / 4;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid rgba(149, 160, 177, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(150deg, #ffffff 0%, #fbfcfd 48%, #eef5f4 100%);
  box-shadow:
    0 24px 56px rgba(32, 36, 45, 0.13),
    0 8px 20px rgba(32, 36, 45, 0.07),
    var(--inner);
}

.empty-preview::before {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(221, 227, 236, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(212, 179, 111, 0.1) 0 48%, transparent 48%),
    linear-gradient(180deg, transparent 0 70%, rgba(74, 167, 155, 0.1) 70% 100%);
  content: "";
}

.empty-preview::after {
  position: absolute;
  right: -10%;
  bottom: 22%;
  width: 62%;
  height: 30%;
  border-radius: 8px;
  background: rgba(77, 116, 216, 0.08);
  transform: rotate(-10deg);
  content: "";
}

.preview-chip,
.preview-title,
.preview-card,
.preview-line {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 8px;
}

.preview-chip {
  top: 11%;
  left: 10%;
  width: 31%;
  height: 7%;
  background: linear-gradient(90deg, var(--coral), #dfa58e);
  box-shadow: 0 8px 16px rgba(207, 139, 117, 0.16);
}

.preview-title {
  top: 26%;
  left: 10%;
  width: 72%;
  height: 8%;
  background: #252b36;
  box-shadow: 0 8px 16px rgba(32, 36, 45, 0.12);
}

.preview-title-short {
  top: 37%;
  width: 55%;
}

.preview-card {
  top: 53%;
  width: 34%;
  height: 16%;
  border: 1px solid rgba(188, 198, 211, 0.78);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 24px rgba(32, 36, 45, 0.07);
}

.preview-card-a {
  left: 10%;
}

.preview-card-b {
  right: 10%;
  background: rgba(242, 247, 246, 0.86);
}

.preview-line {
  right: 10%;
  bottom: 12%;
  left: 10%;
  height: 5px;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--teal), var(--accent));
  opacity: 0.72;
}

.empty-state strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 860;
}

.empty-state span {
  font-size: 13px;
  font-weight: 720;
}

#resultImage {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  background: #fff;
  box-shadow:
    0 18px 42px rgba(32, 36, 45, 0.13),
    0 6px 16px rgba(32, 36, 45, 0.08);
}

.message-area {
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.message-area[data-tone="error"] {
  color: #b42318;
}

.message-area[data-tone="success"] {
  color: #327f75;
}

.prompt-panel {
  margin-top: 10px;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}

summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 780;
}

pre {
  max-height: 200px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  color: #303846;
  box-shadow: var(--inner);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: relative;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .studio-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: sticky;
    top: 0;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    justify-items: start;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(221, 227, 236, 0.82);
  }

  .rail-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .rail-item {
    width: auto;
    min-height: 38px;
    grid-auto-flow: column;
    align-items: center;
    padding: 0 10px;
  }

  .rail-icon {
    width: 16px;
    height: 16px;
  }

  .rail-status {
    writing-mode: initial;
    max-width: 88px;
    padding: 7px 10px;
  }

  .workspace {
    padding: 18px 14px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .requirements-panel {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 680px) {
  .hero-panel {
    justify-items: start;
    text-align: left;
  }

  h1 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .composer-footer {
    grid-template-columns: 1fr;
  }

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

  .tool-chip {
    width: auto;
  }

  .primary-action {
    grid-column: 1 / -1;
  }

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

  .image-stage {
    min-height: min(540px, 72svh);
  }
}

@media (max-width: 420px) {
  .side-rail {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .brand-mark,
  .rail-status {
    display: none;
  }

  .rail-nav {
    width: 100%;
  }

  .rail-item {
    flex: 1;
  }

  .composer-card,
  .setting-panel,
  .result-panel {
    padding: 13px;
  }

  .option-button {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 60px;
    padding: 9px;
  }

  .option-visual {
    width: 28px;
    height: 34px;
  }

  .option-name {
    font-size: 13px;
  }

  .option-meta {
    font-size: 11px;
  }
}
