:root {
  color-scheme: light;
  --paper: #e7e5de;
  --panel: #f5f4ee;
  --white: #fffef8;
  --ink: #11110f;
  --muted: #595852;
  --line: #aaa89f;
  --orange: #f04b23;
  --orange-dark: #c93514;
  --yellow: #f5df59;
  --green: #20a36a;
  --sans: Arial, Helvetica, sans-serif;
  --mono: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--white);
  background: var(--orange);
}

.app-frame {
  width: min(1380px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  border-right: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 78px;
  align-items: stretch;
  background: var(--panel);
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: stretch;
}

.brand-initials {
  display: grid;
  width: 78px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
  border-right: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.brand-initials img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  min-width: 220px;
  flex-direction: column;
  justify-content: center;
  padding: 0 22px;
}

.brand-copy strong {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead-nav {
  display: flex;
  align-items: stretch;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.masthead-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 18px;
  color: var(--ink);
  border-left: 1px solid var(--ink);
  line-height: 1;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}

.masthead-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.masthead-link.is-kofi svg {
  color: var(--orange-dark);
}

.masthead-link.is-kofi:hover {
  color: var(--white);
  background: var(--orange);
}

.masthead-link.is-kofi:hover svg {
  color: var(--white);
}

.masthead-link.is-bmc:hover {
  color: var(--ink);
  background: var(--yellow);
}

.masthead-link.is-github:hover {
  color: var(--white);
  background: var(--ink);
}

.masthead-link:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.masthead-meta {
  display: flex;
  align-items: stretch;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.masthead-meta > span {
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-left: 1px solid var(--ink);
}

.install-nav-button {
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: var(--ink);
  background: var(--yellow);
  border: 0;
  border-left: 1px solid var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}

.install-nav-button:hover {
  color: var(--white);
  background: var(--orange);
}

.install-nav-button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.engine-status {
  gap: 9px;
}

.engine-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.engine-status.is-online::before {
  background: var(--green);
}

.engine-status.is-partial::before {
  background: var(--yellow);
}

.engine-status.is-offline::before {
  background: var(--orange);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(390px, 0.84fr) minmax(550px, 1.16fr);
  min-height: 690px;
  border-bottom: 2px solid var(--ink);
}

.intro-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(46px, 5vw, 78px) clamp(34px, 4.8vw, 70px) 42px;
  border-right: 2px solid var(--ink);
}

.utility-code {
  margin: 0 0 30px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

h1 {
  margin: 0;
  font-size: clamp(68px, 7.8vw, 112px);
  font-weight: 950;
  letter-spacing: -0.085em;
  line-height: 0.78;
  text-transform: uppercase;
}

h1 span {
  display: block;
}

h1 span:last-child {
  margin-top: 14px;
  color: var(--paper);
  -webkit-text-stroke: 2px var(--ink);
}

.intro-copy {
  max-width: 440px;
  margin: 40px 0 52px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
}

.system-readout {
  margin-top: auto;
  border-top: 2px solid var(--ink);
}

.system-readout div {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.system-readout span,
.system-readout strong {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.system-readout span {
  color: var(--muted);
}

.system-readout strong {
  font-weight: 700;
}

.rights-note {
  max-width: 440px;
  margin: 22px 0 0;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-left-width: 4px;
  font-size: 14px;
  line-height: 1.45;
}

.rights-note strong {
  display: block;
  margin-bottom: 3px;
}

.tool-panel {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: clamp(28px, 4.2vw, 60px);
  background: #d4d2ca;
}

.tool-shell {
  width: 100%;
  max-width: 720px;
  background: var(--panel);
  border: 2px solid var(--ink);
}

.tool-bar {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: var(--white);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.tool-bar span:last-child {
  color: #aaa99f;
}

.tool-content {
  padding: clamp(22px, 3vw, 36px);
}

.share-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.field-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group > label,
.field-group > legend {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 9px;
  padding: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.field-group > label b,
.field-group > legend b {
  color: var(--orange);
}

.url-control {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  min-height: 58px;
  background: var(--white);
  border: 2px solid var(--ink);
  transition: box-shadow 120ms ease;
}

.url-control:focus-within {
  box-shadow: 5px 5px 0 var(--orange);
}

.url-control.has-error {
  border-color: var(--orange-dark);
}

.url-prefix {
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.url-control input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--mono);
  font-size: 11px;
}

.url-control input::placeholder {
  color: var(--muted);
}

.paste-button {
  min-width: 72px;
  padding: 0 14px;
  background: var(--yellow);
  border: 0;
  border-left: 2px solid var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.paste-button:hover {
  color: var(--white);
  background: var(--ink);
}

.field-error {
  margin: 9px 0 0;
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.content-type-group {
  margin-top: 24px;
}

.content-type-group .select-control {
  max-width: 100%;
}

.choice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(165px, 0.75fr);
  gap: 18px;
  margin-top: 24px;
}

.format-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.format-option {
  position: relative;
  cursor: pointer;
}

.format-option:not([hidden]) + .format-option:not([hidden]) {
  margin-left: -2px;
}

.format-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.format-option span {
  display: flex;
  min-height: 64px;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px;
  background: var(--white);
  border: 2px solid var(--ink);
}

.format-option strong {
  font-family: var(--mono);
  font-size: 13px;
}

.format-option small {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.format-option:hover span {
  background: #eceae2;
}

.format-option input:focus-visible + span {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  z-index: 1;
}

.format-option input:checked + span {
  position: relative;
  z-index: 2;
  color: var(--white);
  background: var(--orange);
}

.format-option input:checked + span small {
  color: var(--ink);
}

.select-control {
  position: relative;
}

.select-control select {
  width: 100%;
  height: 64px;
  padding: 0 40px 0 14px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 0;
  outline: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.select-control select:focus-visible {
  box-shadow: 4px 4px 0 var(--orange);
}

.select-control svg {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 17px;
  pointer-events: none;
  transform: translateY(-50%);
}

.primary-button,
.download-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}

.primary-button {
  width: 100%;
  min-height: 58px;
  margin-top: 24px;
  padding: 0 17px;
  background: var(--orange);
}

.primary-button svg,
.download-button svg {
  width: 20px;
}

.primary-button:hover,
.download-button:hover {
  color: var(--white);
  background: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--orange);
}

.primary-button:disabled,
.download-button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.working-state {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 15px;
  background: var(--yellow);
  border: 2px solid var(--ink);
}

.working-text {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
}

.working-progress {
  width: 100%;
  height: 6px;
  margin-top: 6px;
  background: var(--white);
  border: 1px solid var(--ink);
  overflow: hidden;
}

.working-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--orange);
  transition: width 180ms ease;
}

.cancel-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}

.cancel-button:hover {
  color: var(--white);
  background: var(--ink);
}

.cancel-button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.working-state strong,
.working-text span {
  font-family: var(--mono);
}

.working-state strong {
  font-size: 10px;
  text-transform: uppercase;
}

.working-text span {
  color: #555349;
  font-size: 10px;
}

.spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid rgba(17, 17, 15, 0.28);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 17px;
  align-items: center;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.result-header {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  margin-bottom: -8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.result-header span:last-child {
  color: var(--orange);
}

.result-preview {
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  width: 100%;
  max-height: 420px;
  justify-self: center;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  background: #141412;
  border: 2px solid var(--ink);
}

.result-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-preview > span:not(.duration) {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.result-preview svg {
  width: 48px;
  opacity: 0.7;
}

.duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--white);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.result-details {
  min-width: 0;
}

.result-source {
  display: block;
  margin-bottom: 5px;
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.result-details h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-details p {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.download-button {
  gap: 18px;
  min-height: 46px;
  padding: 0 14px;
  color: var(--white);
  background: var(--ink);
}

.download-button:hover {
  color: var(--ink);
  background: var(--yellow);
}

.download-button svg {
  width: 17px;
}

.service-rail {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 74px;
  border-bottom: 2px solid var(--ink);
}

.rail-label {
  display: flex;
  align-items: center;
  padding: 0 24px;
  color: var(--white);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.platform-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--ink);
}

.platform-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 0 10px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  transition: color 120ms ease, background 120ms ease;
}

.platform-tag b {
  color: var(--muted);
  font-size: 10px;
}

.platform-tag.is-active {
  color: var(--white);
  background: var(--orange);
}

.platform-tag.is-active b {
  color: var(--white);
}

.method {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) 1.3fr;
  border-bottom: 2px solid var(--ink);
}

.method header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px clamp(28px, 4vw, 58px);
  background: var(--orange);
  border-right: 2px solid var(--ink);
}

.method header span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.method h2 {
  margin: 11px 0 0;
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.method ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.method li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 6px;
  padding: 40px 22px;
  border-right: 1px solid var(--ink);
}

.method li:last-child {
  border-right: 0;
}

.method li > b {
  color: var(--orange-dark);
  font-family: var(--mono);
  font-size: 10px;
}

.method li span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.method li strong {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
}

footer {
  display: flex;
  flex-wrap: wrap;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 16px 24px;
  color: #b8b7af;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.install-popup {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 50;
  width: min(390px, calc(100% - 40px));
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.install-popup-bar {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  color: var(--white);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.install-close-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--white);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
}

.install-close-button:hover {
  color: var(--orange);
}

.install-popup-body {
  padding: 16px;
}

.install-popup-body strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.install-popup-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.install-ios-steps {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.install-ios-steps strong {
  display: inline;
  font-size: inherit;
  text-transform: none;
}

.install-popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.install-action-button,
.install-dismiss-button {
  min-height: 42px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}

.install-action-button {
  flex: 1 1 auto;
  color: var(--ink);
  background: var(--orange);
}

.install-action-button:hover {
  color: var(--white);
  background: var(--ink);
}

.install-dismiss-button {
  color: var(--ink);
  background: var(--white);
}

.install-dismiss-button:hover {
  color: var(--white);
  background: var(--ink);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1020px) {
  .app-frame {
    border: 0;
  }

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

  .intro-panel {
    min-height: auto;
    padding: 36px clamp(22px, 5vw, 48px);
    border-right: 0;
    border-bottom: 0;
  }

  h1 {
    font-size: clamp(76px, 14vw, 126px);
  }

  .intro-copy {
    margin-bottom: 46px;
  }

  .tool-panel {
    order: -1;
    padding: 28px clamp(16px, 5vw, 48px);
    border-bottom: 2px solid var(--ink);
  }

  .service-rail {
    grid-template-columns: 160px 1fr;
  }

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

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

  .method header {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }
}

@media (max-width: 980px) {
  .masthead {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .masthead-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--ink);
  }

  .masthead-link {
    min-height: 44px;
    padding: 0 10px;
  }

  .masthead-link:first-child {
    border-left: 0;
  }
}

@media (max-width: 700px) {
  .masthead {
    min-height: 0;
  }

  .brand {
    min-height: 54px;
  }

  .brand-initials {
    width: 54px;
    height: 54px;
    font-size: 16px;
  }

  .brand-copy {
    min-width: 0;
    padding: 0 12px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .brand-copy small {
    margin-top: 2px;
    font-size: 9px;
  }

  .masthead-link {
    min-height: 42px;
  }

  .masthead-meta > span {
    padding: 0 13px;
  }

  .install-nav-button {
    padding: 0 12px;
  }

  .engine-status {
    font-size: 10px;
  }

  .intro-panel {
    min-height: auto;
    padding: 28px 16px 24px;
  }

  .utility-code {
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(64px, 22vw, 106px);
  }

  .intro-copy {
    margin: 24px 0 28px;
    font-size: 14px;
  }

  .tool-panel {
    padding: 12px 10px;
  }

  .tool-bar {
    min-height: 34px;
    padding: 0 11px;
    font-size: 10px;
  }

  .tool-bar span:last-child {
    display: none;
  }

  .tool-content {
    padding: 16px 14px;
  }

  .url-control {
    min-height: 50px;
  }

  .url-control input {
    height: 46px;
    font-size: 16px;
  }

  .content-type-group {
    margin-top: 14px;
  }

  .choice-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 14px;
  }

  .format-option span {
    min-height: 52px;
  }

  .select-control select {
    height: 48px;
    font-size: 16px;
  }

  .primary-button {
    min-height: 50px;
    margin-top: 14px;
  }

  .install-popup {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .download-button {
    width: 100%;
  }

  .service-rail {
    grid-template-columns: 1fr;
  }

  .rail-label {
    min-height: 38px;
  }

  .platform-list {
    min-height: 60px;
  }

  .method ol {
    grid-template-columns: 1fr;
  }

  .method li {
    padding: 24px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .method li:last-child {
    border-bottom: 0;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 16px;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .masthead-nav {
    grid-template-columns: 0.82fr 1.36fr 0.82fr;
  }

  .masthead-link {
    gap: 5px;
    padding: 0 6px;
    font-size: 9px;
    letter-spacing: 0.02em;
  }

  .masthead-link svg {
    width: 13px;
    height: 13px;
  }

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

  .platform-tag:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 440px) {
  .install-nav-button {
    padding: 0 10px;
    font-size: 9px;
  }

  .engine-status {
    font-size: 0;
  }

  .engine-status::before {
    width: 10px;
    height: 10px;
  }

  .url-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .url-prefix {
    display: none;
  }

  .paste-button {
    min-width: 64px;
  }

  .format-option span {
    padding: 0 9px;
  }

  .system-readout div {
    grid-template-columns: 90px 1fr;
  }
}

@media (display-mode: standalone) {
  .masthead {
    padding-top: env(safe-area-inset-top);
  }

  footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
