:root {
  --paper: #f3efe5;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17201d;
  --muted: #65716b;
  --line: rgb(23 32 29 / 14%);
  --line-strong: rgb(23 32 29 / 24%);
  --orange: #f1883d;
  --orange-deep: #c65a18;
  --orange-soft: #fff0df;
  --green: #0f8f6d;
  --green-dark: #0a4737;
  --green-soft: #def3e9;
  --yellow: #f6d65f;
  --red: #c74f42;
  --shadow: 0 24px 70px rgb(41 48 42 / 13%);
  color-scheme: light;
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 2%, rgb(15 143 109 / 15%), transparent 30rem),
    radial-gradient(circle at 95% 5%, rgb(241 136 61 / 21%), transparent 31rem),
    linear-gradient(135deg, #eef3ec 0%, var(--paper) 52%, #eee6d7 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="range"],
input[type="color"] {
  cursor: pointer;
}

button {
  color: inherit;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

h1,
h2,
h3,
p,
pre,
fieldset {
  margin: 0;
}

.page {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--orange);
  box-shadow: 3px 3px 0 var(--yellow);
  content: "";
  transform: rotate(8deg);
}

h1 {
  max-width: 820px;
  font-size: clamp(38px, 4.5vw, 62px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 800;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.button,
.support-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.button {
  border: 1px solid var(--line);
  background: white;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.button:hover {
  border-color: rgb(241 136 61 / 55%);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button--dark {
  border-color: var(--ink);
  color: white;
  background: var(--ink);
}

.button--dark:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.support-chip {
  border: 1px solid rgb(15 143 109 / 25%);
  color: var(--green-dark);
  background: var(--green-soft);
}

.support-chip::before {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.support-chip.is-unsupported {
  border-color: rgb(199 79 66 / 25%);
  color: #87372d;
  background: #fbe5e1;
}

.support-chip.is-unsupported::before {
  background: var(--red);
}

.support-notice {
  margin-bottom: 15px;
  padding: 13px 16px;
  border: 1px solid rgb(199 79 66 / 25%);
  border-radius: 14px;
  color: #79372f;
  background: #fbe9e5;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.workspace {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.control-panel,
.result-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgb(255 253 248 / 88%);
  box-shadow: var(--shadow);
}

.control-panel {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 0;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.control-panel::-webkit-scrollbar {
  width: 8px;
}

.control-panel::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 99px;
  background: rgb(23 32 29 / 22%);
  background-clip: padding-box;
}

.panel-head,
.control-section {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head > div:first-child,
.preview-toolbar > div,
.code-head > div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.panel-head p,
.preview-toolbar p,
.code-head p {
  color: var(--orange-deep);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.panel-head h2,
.preview-toolbar h2,
.code-head h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.2;
}

.section-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  color: white;
  background: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
}

.section-number--orange {
  background: var(--orange);
}

.section-number--dark {
  background: var(--ink);
}

.mode-switch,
.unit-switch,
.code-mode,
.size-presets {
  position: relative;
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #efeee8;
}

.mode-switch button,
.unit-switch button,
.code-mode button,
.size-presets button {
  position: relative;
  z-index: 1;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.mode-switch button[aria-pressed="true"],
.unit-switch button[aria-pressed="true"],
.code-mode button[aria-pressed="true"],
.size-presets button[aria-pressed="true"] {
  color: var(--ink);
  background: white;
  box-shadow: 0 3px 11px rgb(23 32 29 / 10%);
}

@supports (anchor-name: --selected-option) {
  .mode-switch::before,
  .unit-switch::before,
  .code-mode::before,
  .size-presets::before {
    position: absolute;
    z-index: 0;
    top: anchor(top);
    left: anchor(left);
    width: anchor-size(width);
    height: anchor-size(height);
    border-radius: 9px;
    background: white;
    box-shadow: 0 3px 11px rgb(23 32 29 / 10%);
    content: "";
    pointer-events: none;
    transition:
      top 260ms cubic-bezier(0.22, 1, 0.36, 1),
      left 260ms cubic-bezier(0.22, 1, 0.36, 1),
      width 260ms cubic-bezier(0.22, 1, 0.36, 1),
      height 260ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .mode-switch button[aria-pressed="true"] {
    anchor-name: --mode-selected;
  }

  .mode-switch::before {
    position-anchor: --mode-selected;
  }

  .unit-switch button[aria-pressed="true"] {
    anchor-name: --unit-selected;
  }

  .unit-switch::before {
    position-anchor: --unit-selected;
  }

  .size-presets button[aria-pressed="true"] {
    anchor-name: --size-selected;
  }

  .size-presets::before {
    position-anchor: --size-selected;
  }

  .code-mode button[aria-pressed="true"] {
    anchor-name: --code-selected;
  }

  .code-mode::before {
    position-anchor: --code-selected;
    background: rgb(255 255 255 / 14%);
    box-shadow: none;
  }

  .mode-switch button[aria-pressed="true"],
  .unit-switch button[aria-pressed="true"],
  .code-mode button[aria-pressed="true"],
  .size-presets button[aria-pressed="true"] {
    background: transparent;
    box-shadow: none;
  }
}

.control-section + .control-section {
  border-top: 1px solid var(--line);
}

.control-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.control-title > div > span {
  color: var(--orange-deep);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.control-title h3 {
  margin-top: 3px;
  font-size: 16px;
}

.control-title > output {
  max-width: 150px;
  overflow: hidden;
  color: var(--green-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.shape-presets button {
  display: grid;
  place-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 80px;
  padding: 9px 5px 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: white;
  font-size: 10px;
  font-weight: 900;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.shape-presets button:hover {
  border-color: rgb(241 136 61 / 55%);
  transform: translateY(-1px);
}

.shape-presets button[aria-pressed="true"] {
  border-color: var(--orange);
  color: var(--orange-deep);
  background: var(--orange-soft);
  box-shadow: inset 0 0 0 1px rgb(241 136 61 / 16%);
}

.shape-preset--custom {
  grid-column: span 2;
}

.shape-sample {
  display: block;
  width: 36px;
  height: 30px;
  border-radius: 12px;
  background: currentColor;
}

.shape-sample--round {
  corner-shape: round;
}

.shape-sample--squircle {
  corner-shape: squircle;
}

.shape-sample--bevel {
  corner-shape: bevel;
}

.shape-sample--notch {
  corner-shape: notch;
}

.shape-sample--scoop {
  corner-shape: scoop;
}

.shape-sample--square {
  corner-shape: square;
}

.shape-sample--custom {
  corner-shape: superellipse(2.5);
}

.range-field {
  display: grid;
  min-width: 0;
}

.range-field > span:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.range-field output {
  color: var(--green-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 900;
}

.range-field input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--orange);
}

.range-scale {
  display: flex !important;
  justify-content: space-between;
  margin-top: 5px !important;
  margin-bottom: 0 !important;
  color: #8b928e !important;
  font-size: 9px !important;
  font-weight: 800;
}

.custom-curve {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgb(241 136 61 / 24%);
  border-radius: 14px;
  background: var(--orange-soft);
}

.radius-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.unit-switch {
  margin-bottom: -1px;
}

.unit-switch button {
  min-width: 42px;
}

.control-title--corners {
  align-items: center;
}

.link-corners {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: white;
  font-size: 10px;
  font-weight: 900;
}

.link-corners[aria-pressed="true"] {
  border-color: var(--green);
  color: var(--green-dark);
  background: var(--green-soft);
}

.corner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.corner-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.corner-card > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.corner-card select,
.corner-card input[type="number"] {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #faf9f5;
  font-size: 10px;
  font-weight: 800;
}

.corner-card select {
  padding: 0 7px;
}

.corner-card input[type="number"] {
  padding: 0 8px;
}

.corner-radius-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.corner-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
}

.custom-exponent-field {
  margin-top: 6px;
}

.size-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 13px;
}

.appearance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.color-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.color-control {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 40px;
  padding: 4px 8px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
}

.color-control input {
  flex: 0 0 auto;
  width: 30px;
  height: 29px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.color-control output {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
}

.range-field--compact {
  margin-top: 13px;
}

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  cursor: pointer;
}

.switch-field > span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
}

.switch-field b {
  color: var(--ink);
  font-size: 11px;
}

.switch-field small {
  line-height: 1.4;
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-field i {
  position: relative;
  flex: 0 0 auto;
  width: 43px;
  height: 25px;
  border-radius: 999px;
  background: #d5d6d0;
  transition: background-color 160ms ease;
}

.switch-field i::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgb(23 32 29 / 20%);
  content: "";
  transition: transform 160ms ease;
}

.switch-field input:checked + i {
  background: var(--green);
}

.switch-field input:checked + i::after {
  transform: translateX(18px);
}

.result-panel {
  padding: 22px;
}

.preview-toolbar,
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.preview-toolbar {
  margin-bottom: 17px;
}

.preview-value {
  max-width: min(46%, 440px);
  overflow: hidden;
  padding: 8px 12px;
  border: 1px solid rgb(241 136 61 / 24%);
  border-radius: 999px;
  color: var(--orange-deep);
  background: var(--orange-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background-color: #eeeae0;
  background-image:
    linear-gradient(rgb(23 32 29 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 32 29 / 5%) 1px, transparent 1px);
  background-size: 22px 22px;
  overflow: hidden;
}

.preview-stage::before,
.preview-stage::after {
  position: absolute;
  z-index: 0;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  filter: blur(2px);
  content: "";
}

.preview-stage::before {
  top: -150px;
  right: -70px;
  background: rgb(246 214 95 / 68%);
}

.preview-stage::after {
  bottom: -165px;
  left: -70px;
  background: rgb(15 143 109 / 23%);
}

.corner-preview {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: min(72%, 620px);
  min-width: 260px;
  aspect-ratio: 1.48;
  padding: clamp(24px, 4vw, 48px);
  border: 3px solid var(--ink);
  border-radius: 56px;
  corner-shape: squircle;
  color: var(--ink);
  background: #ff9a4a;
  box-shadow:
    0 30px 54px rgb(23 32 29 / 20%),
    0 8px 0 rgb(255 255 255 / 27%) inset;
  overflow: hidden;
  transition:
    width 280ms ease,
    aspect-ratio 280ms ease,
    border-radius 280ms ease,
    corner-shape 280ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.corner-preview::before {
  position: absolute;
  top: 27%;
  right: -10%;
  width: 46%;
  aspect-ratio: 1;
  border: 1px solid rgb(23 32 29 / 20%);
  border-radius: 50%;
  content: "";
}

.corner-preview::after {
  position: absolute;
  right: 7%;
  bottom: 12%;
  width: 18%;
  height: 4px;
  border-radius: 99px;
  background: currentColor;
  box-shadow:
    0 11px 0 currentColor,
    0 22px 0 currentColor;
  content: "";
  opacity: 0.36;
}

.corner-preview--square {
  width: min(58%, 500px);
  aspect-ratio: 1;
}

.corner-preview--portrait {
  width: min(46%, 390px);
  aspect-ratio: 0.76;
}

.preview-kicker,
.preview-code {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.corner-preview > div {
  position: relative;
  z-index: 1;
}

.corner-preview strong {
  display: block;
  max-width: 88%;
  overflow: hidden;
  font-size: clamp(32px, 5vw, 68px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.corner-preview p {
  margin-top: 8px;
  font-size: clamp(13px, 1.45vw, 18px);
  font-weight: 800;
}

.preview-code {
  align-self: flex-start;
  max-width: 76%;
  overflow: hidden;
  padding: 8px 11px;
  border: 1px solid rgb(23 32 29 / 13%);
  border-radius: 999px;
  background: rgb(255 255 255 / 40%);
  font-family: "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.corner-label {
  position: absolute;
  z-index: 2;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--muted);
  background: rgb(255 253 248 / 88%);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 5px 16px rgb(23 32 29 / 10%);
  opacity: 0;
  transition: opacity 160ms ease;
}

body[data-mode="advanced"] .corner-label {
  opacity: 1;
}

.corner-label--tl {
  top: 14px;
  left: 14px;
}

.corner-label--tr {
  top: 14px;
  right: 14px;
}

.corner-label--br {
  right: 14px;
  bottom: 14px;
}

.corner-label--bl {
  bottom: 14px;
  left: 14px;
}

.code-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #111816;
  overflow: hidden;
}

.code-head {
  padding: 16px 17px;
  border-bottom: 1px solid rgb(255 255 255 / 11%);
}

.code-head p {
  color: #ffad6f;
}

.code-head h2 {
  color: white;
}

.code-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.code-mode {
  border-color: rgb(255 255 255 / 10%);
  background: rgb(255 255 255 / 8%);
}

.code-mode button {
  color: rgb(255 255 255 / 58%);
}

.code-mode button[aria-pressed="true"] {
  color: white;
  background: rgb(255 255 255 / 14%);
  box-shadow: none;
}

.button--copy {
  border-color: var(--orange);
  color: #2b1608;
  background: #ff9a4a;
}

.button--copy:hover {
  color: #1b1009;
  background: #ffad6f;
}

.code-panel pre {
  min-height: 190px;
  max-height: 310px;
  padding: 22px;
  color: #e9f6ef;
  overflow: auto;
  font-size: clamp(11px, 1.1vw, 14px);
  line-height: 1.7;
  tab-size: 2;
}

.code-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 39px;
  padding: 10px 16px;
  border-top: 1px solid rgb(255 255 255 / 9%);
  color: rgb(255 255 255 / 48%);
  font-size: 9px;
  font-weight: 800;
}

.copy-status {
  color: #8ff0c9;
}

.usage-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  padding: 14px 16px;
  border: 1px solid rgb(241 136 61 / 24%);
  border-radius: 16px;
  color: #6e5a4d;
  background: var(--orange-soft);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.55;
}

.usage-note > strong {
  color: var(--orange-deep);
  font-size: 9px;
  letter-spacing: 0.11em;
}

.usage-note a {
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(241 136 61 / 38%);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 370px minmax(0, 1fr);
  }

  .shape-presets {
    grid-template-columns: repeat(3, 1fr);
  }

  .shape-preset--custom {
    grid-column: span 3;
  }

  .preview-stage {
    min-height: 450px;
    padding: 42px;
  }

  .corner-preview {
    width: min(83%, 620px);
  }
}

@media (max-width: 900px) {
  .page {
    width: min(760px, calc(100% - 32px));
    padding-top: 24px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
  }

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

  .control-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .shape-presets {
    grid-template-columns: repeat(7, 1fr);
  }

  .shape-preset--custom {
    grid-column: auto;
  }

  .result-panel {
    grid-row: 1;
  }

  .control-panel {
    grid-row: 2;
  }
}

@media (max-width: 680px) {
  .page {
    width: min(100% - 22px, 600px);
    padding-top: 17px;
  }

  h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .hero {
    gap: 18px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .support-chip {
    grid-column: 1 / -1;
  }

  .button {
    width: 100%;
  }

  .result-panel {
    padding: 13px;
    border-radius: 21px;
  }

  .preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-value {
    max-width: 100%;
  }

  .preview-stage {
    min-height: 370px;
    padding: 38px 22px;
  }

  .corner-preview,
  .corner-preview--square,
  .corner-preview--portrait {
    width: min(82%, 410px);
    min-width: 210px;
    padding: 24px;
  }

  .corner-preview strong {
    max-width: 100%;
    font-size: clamp(25px, 8vw, 38px);
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .shape-presets {
    grid-template-columns: repeat(3, 1fr);
  }

  .shape-preset--custom {
    grid-column: span 3;
  }

  .corner-grid,
  .appearance-grid {
    grid-template-columns: 1fr;
  }

  .code-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .code-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .code-panel pre {
    min-height: 170px;
    padding: 17px;
  }

  .code-foot,
  .usage-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .usage-note {
    display: flex;
  }
}

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