:root {
  --bg-color: #f5f5f7;
  --text-color: #1d1d1f;
  --text-secondary: #86868b;
  --accent-color: #0071e3;
  --accent-hover: #0077ed;
  --card-bg: #ffffff;
  --border-radius: 18px;
  --switch-bg: #e5e5ea;
  --twitter-color: #1d9bf0;
  --support-color: #0070ba;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans‑serif;
  background‑color: var(--bg-color);
  color: var(--text-color);
  min‑height: 100vh;
  display: flex;
  flex‑direction: column;
  align‑items: center;
  padding: 30px 20px 10px 20px;
  -webkit‑font‑smoothing: antialiased;
  touch‑action: manipulation;
}
header {
  text‑align: center;
  margin‑bottom: 24px;
  transition: all 0.35s cubic‑bezier(0.4, 0, 0.2, 1);
  max‑height: 100px;
  opacity: 1;
  overflow: hidden;
}
header.hidden {
  margin‑bottom: 0;
  max‑height: 0;
  opacity: 0;
  pointer‑events: none;
}
h1 {
  font‑size: 32px;
  font‑weight: 700;
  letter‑spacing: ‑0.5px;
  margin‑bottom: 8px;
}
p.subtitle {
  font‑size: 15px;
  color: var(--text‑secondary);
}
main {
  width: 100%;
  max‑width: 480px;
  display: flex;
  flex‑direction: column;
  gap: 16px;
  transition: transform 0.35s cubic‑bezier(0.4, 0, 0.2, 1);
}
.top‑bar {
  display: flex;
  justify‑content: flex‑end;
  align‑items: center;
  margin‑bottom: ‑8px;
  gap: 12px;
}
.icon‑btn {
  background: var(--card‑bg);
  border: none;
  border‑radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align‑items: center;
  justify‑content: center;
  box‑shadow: 0 2px 8px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: 0.2s;
}
.icon‑btn:active {
  transform: scale(0.9);
}
.icon‑btn:disabled {
  opacity: 0.3;
  cursor: not‑allowed;
}
.icon‑btn svg {
  width: 18px;
  height: 18px;
  fill: var(--text‑color);
}
.card {
  background: var(--card‑bg);
  border‑radius: var(--border‑radius);
  padding: 24px;
  box‑shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  display: flex;
  flex‑direction: column;
  align‑items: center;
  justify‑content: center;
  min‑height: 200px;
  position: relative;
  overflow: hidden;
  transition: box‑shadow .25s ease, background‑color .25s ease;
}
.card.drag‑over {
  background‑color: #f0f7ff;
  box‑shadow: 0 0 0 3px rgba(0,113,227,0.35), 0 8px 32px rgba(0,113,227,0.18);
}
input[type="file"] {
  display: none;
}
.upload‑label {
  display: flex;
  flex‑direction: column;
  align‑items: center;
  cursor: pointer;
  width: 100%;
  padding: 20px 0;
  transition: opacity 0.2s;
}
.upload‑label:active {
  opacity: 0.6;
}
.upload‑icon {
  width: 48px;
  height: 48px;
  background: var(--bg‑color);
  border‑radius: 50%;
  display: flex;
  align‑items: center;
  justify‑content: center;
  margin‑bottom: 16px;
}
.upload‑icon svg {
  width: 24px;
  height: 24px;
  fill: var(--text‑color);
}
.upload‑text {
  font‑size: 17px;
  font‑weight: 500;
  color: var(--accent‑color);
}
.drag‑tip {
  font‑size: 12px;
  color: var(--text‑secondary);
  margin‑top: 10px;
}
.canvas‑wrapper {
  display: none;
  width: 100%;
  justify‑content: center;
  position: relative;
}
.canvas‑container {
  position: relative;
  width: 100%;
  max‑width: 100%;
  overflow: hidden;
  border‑radius: 12px;
  box‑shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  display: flex;
  justify‑content: center;
  background: #000;
  user‑select: none;
  -webkit‑user‑select: none;
}
canvas {
  max‑width: 100%;
  height: auto;
  display: block;
  opacity: 1;
  transition: opacity 0.2s;
  pointer‑events: none;
}
.change‑photo‑hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font‑size: 12px;
  padding: 6px 12px;
  border‑radius: 20px;
  display: flex;
  align‑items: center;
  gap: 6px;
  backdrop‑filter: blur(4px);
  pointer‑events: auto;
  opacity: 0.8;
  transition: opacity 0.3s;
  z‑index: 3;
  cursor: pointer;
}
.controls‑panel {
  display: none;
  background: var(--card‑bg);
  border‑radius: var(--border‑radius);
  padding: 20px 24px;
  box‑shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  flex‑direction: column;
  gap: 20px;
}
.select‑row {
  display: flex;
  justify‑content: space‑between;
  align‑items: center;
  margin‑bottom: 4px;
}
.ratio‑left {
  display: flex;
  align‑items: center;
  gap: 10px;
}
.select‑custom {
  -webkit‑appearance: none;
  appearance: none;
  background‑color: var(--bg‑color);
  border: none;
  padding: 8px 30px 8px 12px;
  border‑radius: 10px;
  font‑size: 14px;
  font‑weight: 500;
  color: var(--text‑color);
  cursor: pointer;
  outline: none;
  background‑image: url("data:image/svg+xml;charset=US‑ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231d1d1f%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200‑13‑5.4H18.4c‑5%200‑9.3%201.8‑12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2‑1.8%2012.8‑5.4L287%2095c3.5‑3.5%205.4‑7.8%205.4‑12.8%200‑5‑1.9‑9.2‑5.5‑12.8z%22%2F%3E%3C%2Fsvg%3E");
  background‑repeat: no‑repeat;
  background‑position: right 10px top 50%;
  background‑size: 10px auto;
}
.control‑row {
  display: flex;
  justify‑content: space‑between;
  align‑items: center;
}
.control‑label {
  font‑size: 15px;
  font‑weight: 500;
  white‑space: nowrap;
}
.control‑value {
  color: var(--accent‑color);
  font‑weight: 700;
  font‑size: 18px;
  font‑variant‑numeric: tabular‑nums;
  text‑align: right;
  min‑width: 50px;
}
.control‑unit {
  font‑size: 13px;
  font‑weight: 500;
  color: var(--text‑secondary);
  margin‑left: 2px;
}
.slider‑container {
  position: relative;
  padding‑bottom: 20px;
}
input[type="range"]#partsSlider {
  -webkit‑appearance: none;
  width: 100%;
  background: transparent;
  margin: 10px 0;
  position: relative;
  z‑index: 2;
  touch‑action: none;
}
input[type="range"]#partsSlider::-webkit‑slider‑runnable‑track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: var(--switch‑bg);
  border‑radius: 3px;
}
input[type="range"]#partsSlider::-webkit‑slider‑thumb {
  -webkit‑appearance: none;
  height: 22px;
  width: 22px;
  border‑radius: 50%;
  background: #ffffff;
  box‑shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
  cursor: pointer;
  margin‑top: ‑8px;
  transition: transform 0.1s;
}
.ticks {
  display: flex;
  justify‑content: space‑between;
  position: absolute;
  width: calc(100% ‑ 10px);
  left: 5px;
  top: 30px;
  z‑index: 1;
  pointer‑events: none;
}
.tick {
  display: flex;
  flex‑direction: column;
  align‑items: center;
  width: 2px;
}
.tick‑line {
  width: 2px;
  height: 4px;
  background: #ccc;
  margin‑bottom: 4px;
  border‑radius: 1px;
}
.tick‑label {
  font‑size: 10px;
  color: var(--text‑secondary);
}
.toggles‑grid {
  display: grid;
  grid‑template‑columns: 1fr;
  gap: 14px;
  padding‑top: 10px;
  border‑top: 1px solid var(--bg‑color);
}
.switch‑group {
  display: flex;
  justify‑content: space‑between;
  align‑items: center;
  gap: 8px;
}
.switch‑label {
  font‑size: 14px;
  font‑weight: 500;
  white‑space: nowrap;
}
.switch {
  position: relative;
  display: inline‑block;
  width: 44px;
  height: 26px;
  flex‑shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background‑color: var(--switch‑bg);
  transition: .3s;
  border‑radius: 26px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background‑color: white;
  transition: .3s;
  border‑radius: 50%;
  box‑shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .slider {
  background‑color: var(--accent‑color);
}
input:checked + .slider:before {
  transform: translateX(18px);
}
.action‑buttons {
  display: flex;
  flex‑direction: column;
  gap