:root {
  color-scheme: light;
  --app-bg: #edeceb;
  --surface: #fbfaf7;
  --surface-strong: #ffffff;
  --ink: #151515;
  --muted: #696969;
  --line: #d9d5cf;
  --soft-line: rgba(21, 21, 21, 0.1);
  --accent: #2352a4;
  --accent-warm: #b85f42;
  --shadow: 0 18px 50px rgba(20, 18, 16, 0.14);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(35, 82, 164, 0.12), transparent 34%),
    linear-gradient(215deg, rgba(184, 95, 66, 0.12), transparent 38%),
    var(--app-bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.app {
  position: relative;
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(21, 21, 21, 0.06);
  overflow: hidden;
}

.upload-screen {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
}

.upload-target {
  position: relative;
  display: grid;
  width: min(100%, 360px);
  min-height: 520px;
  place-items: center;
  align-content: end;
  gap: 8px;
  padding: 26px 26px 30px;
  color: #fdfbf6;
  background: #151515;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  transition: transform 420ms ease;
}

.upload-target::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.02) 0 44%, rgba(15, 15, 15, 0.64) 100%);
  pointer-events: none;
}

.upload-target::after {
  display: none;
}

.home-example-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.home-example-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translateX(18px) scale(1.02);
  transition:
    opacity 520ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.upload-target[data-home-example="0"] .home-example-slide:nth-child(1),
.upload-target[data-home-example="1"] .home-example-slide:nth-child(2) {
  opacity: 1;
  transform: translateX(0) scale(1.02);
}

.upload-target[data-home-example="0"] .home-example-slide:nth-child(2) {
  transform: translateX(18px) scale(1.02);
}

.upload-target[data-home-example="1"] .home-example-slide:nth-child(1) {
  transform: translateX(-18px) scale(1.02);
}

.upload-mark {
  position: relative;
  z-index: 2;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #151515;
  background: #ffffff;
  border-radius: 999px;
}

.upload-icon {
  width: 32px;
  height: 32px;
  stroke-width: 2.2;
}

.upload-subtitle {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
}

.continue-button {
  min-height: 46px;
  padding: 0 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(24, 22, 20, 0.1);
  cursor: pointer;
  font-size: 14px;
  font-weight: 820;
  backdrop-filter: blur(14px);
}

.studio {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom));
  gap: 10px;
}

.topbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  cursor: pointer;
}

.icon-button:disabled {
  color: #b6b1aa;
  cursor: default;
}

.month-heading {
  min-width: 0;
  text-align: center;
}

.month-heading p {
  margin: 0 0 1px;
  color: var(--accent-warm);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.month-heading h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.preview-stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
}

#posterCanvas {
  display: block;
  width: min(100%, calc((100dvh - 168px) * 0.75));
  max-width: 420px;
  max-height: calc(100dvh - 168px);
  aspect-ratio: 3 / 4;
  background: #d8d3cb;
  border-radius: 8px;
  box-shadow: var(--shadow);
  touch-action: none;
  transition: width 240ms ease, max-height 240ms ease;
}

body.sheet-open .preview-stage {
  align-items: start;
  padding-top: 2px;
}

body.sheet-open #posterCanvas {
  width: min(100%, calc(var(--preview-available-height, 220px) * 0.75));
  max-height: var(--preview-available-height, 220px);
}

.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.loading-overlay span {
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(18, 18, 18, 0.82);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-line {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.5;
  text-align: center;
}

.tooldock {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(24, 22, 20, 0.1);
  backdrop-filter: blur(18px);
}

.tool-button {
  display: grid;
  min-width: 0;
  min-height: 54px;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.tool-icon {
  font-size: 19px;
  width: 21px;
  height: 21px;
  stroke-width: 2.1;
  line-height: 1;
}

.primary-tool {
  color: #ffffff;
  background: #151515;
  grid-template-rows: 1fr;
}

.image-quick-menu {
  position: fixed;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
  background: rgba(24, 24, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -116%);
  backdrop-filter: blur(16px);
}

.image-quick-menu::after {
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  content: "";
  background: rgba(24, 24, 24, 0.92);
  transform: translateX(-50%) rotate(45deg);
}

.image-quick-menu button {
  position: relative;
  z-index: 1;
  min-width: 58px;
  min-height: 38px;
  padding: 0 14px;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
}

.image-quick-menu button + button {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0 0 env(safe-area-inset-bottom);
  background: transparent;
}

.sheet-backdrop[hidden] {
  display: none;
}

.sheet {
  width: min(100%, 480px);
  max-height: min(50dvh, 460px);
  padding: 16px 16px 18px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -18px 60px rgba(20, 18, 16, 0.2);
  overflow-y: auto;
}

.sheet-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.sheet-header h2 {
  margin: 0;
  font-size: 19px;
}

.sheet-panel {
  display: none;
  gap: 10px;
}

.sheet-panel.is-active {
  display: grid;
}

.sheet-panel.template-track.is-active {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 48px 2px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.sheet-panel.template-track.is-active::-webkit-scrollbar {
  display: none;
}

.sheet-panel.style-track.is-active {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 48px 2px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.sheet-panel.style-track.is-active::-webkit-scrollbar {
  display: none;
}

.action-row,
.template-choice {
  width: 100%;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 760;
}

.action-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.action-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  stroke-width: 2;
}

.action-chevron {
  width: 19px;
  height: 19px;
  color: #9a948d;
  stroke-width: 2.2;
}

.muted-action {
  color: var(--muted);
  justify-content: center;
}

.template-choice {
  display: grid;
  justify-items: center;
  gap: 8px;
  flex: 0 0 88px;
  min-height: 116px;
  padding: 10px 8px;
  scroll-snap-align: start;
  text-align: center;
}

.template-choice.is-active {
  border-color: #151515;
  box-shadow: inset 0 0 0 2px #151515;
}

.template-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.2;
}

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

.font-style-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 48px 4px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.font-style-grid::-webkit-scrollbar {
  display: none;
}

.style-choice {
  flex: 0 0 auto;
  min-width: 74px;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 780;
  text-align: center;
  scroll-snap-align: start;
}

.font-style-choice {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  min-width: 58px;
  height: 58px;
  min-height: 58px;
  place-items: center;
  padding: 0;
  border-radius: 999px;
}

.font-style-icon {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
}

.font-style-icon::before,
.font-style-icon::after {
  position: absolute;
  content: "";
}

.font-clean::before {
  top: 6px;
  left: 3px;
  width: 26px;
  height: 4px;
  background: #151515;
  border-radius: 999px;
  box-shadow: 0 9px 0 #151515, 0 18px 0 #151515;
}

.font-editorial::before {
  top: 1px;
  left: 5px;
  color: #151515;
  content: "A";
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 820;
  line-height: 1;
}

.font-editorial::after {
  right: 3px;
  bottom: 4px;
  width: 11px;
  height: 11px;
  border: 2px solid #151515;
  border-radius: 999px;
}

.font-soft::before {
  top: 4px;
  left: 6px;
  width: 20px;
  height: 20px;
  background: rgba(21, 21, 21, 0.12);
  border: 3px solid #151515;
  border-radius: 999px;
}

.font-soft::after {
  right: 2px;
  bottom: 5px;
  width: 18px;
  height: 5px;
  background: #151515;
  border-radius: 999px;
}

.style-choice.is-active {
  border-color: #151515;
  box-shadow: inset 0 0 0 2px #151515;
}

.effect-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 48px 6px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.effect-row::-webkit-scrollbar {
  display: none;
}

.effect-choice {
  display: grid;
  flex: 0 0 78px;
  justify-items: center;
  gap: 7px;
  min-height: 92px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  scroll-snap-align: start;
}

.effect-preview {
  position: relative;
  display: block;
  width: 72px;
  height: 58px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #72b7dc 0 52%, #82a15c 52%),
    #d8e8f2;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
}

.effect-preview::before,
.effect-preview::after {
  position: absolute;
  content: "";
}

.effect-original::before,
.effect-dot::before,
.effect-beads::before,
.effect-ascii::before {
  top: 20px;
  left: 24px;
  width: 28px;
  height: 16px;
  background: #f8f5ec;
  border-radius: 999px 999px 10px 10px;
  box-shadow: 18px 6px 0 -3px rgba(248, 245, 236, 0.92);
}

.effect-original::after,
.effect-dot::after,
.effect-beads::after,
.effect-ascii::after {
  right: 18px;
  bottom: 13px;
  width: 18px;
  height: 18px;
  background: #315625;
  border-radius: 50% 48% 42% 54%;
  box-shadow: -7px 9px 0 -5px #1e3316, 6px 9px 0 -5px #1e3316;
}

.effect-dot {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 1.6px, transparent 1.8px) 0 0 / 6px 6px,
    linear-gradient(180deg, #72b7dc 0 52%, #82a15c 52%);
}

.effect-beads {
  image-rendering: pixelated;
  background:
    radial-gradient(circle, rgba(21, 21, 21, 0.32) 0 1px, transparent 1.4px) 0 0 / 9px 9px,
    linear-gradient(180deg, #68aad0 0 52%, #6d8745 52%);
}

.effect-ascii {
  background:
    repeating-linear-gradient(0deg, rgba(21, 21, 21, 0.5) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #e8ecee 0 52%, #dfe3dc 52%);
}

.effect-ascii::before {
  color: rgba(21, 21, 21, 0.68);
  background: none;
  border-radius: 0;
  box-shadow: none;
  content: "KKK000\\AEEEYYY\\AHHHMMM";
  font: 800 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
}

.effect-choice.is-active .effect-preview {
  border-color: #151515;
  box-shadow: 0 0 0 3px #151515;
}

.template-preview {
  position: relative;
  display: block;
  width: 54px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #8da18e;
  border: 1px solid rgba(21, 21, 21, 0.28);
  border-radius: 6px;
}

.template-preview span {
  position: absolute;
  display: block;
  background: #ffffff;
}

.full-preview {
  background:
    linear-gradient(180deg, transparent 0 42%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(135deg, #d3bf89, #4c7a76 48%, #213740);
}

.full-preview span:nth-child(1) {
  top: 13%;
  left: 12%;
  width: 48%;
  height: 6%;
}

.full-preview span:nth-child(2) {
  right: 12%;
  bottom: 17%;
  left: 12%;
  height: 27%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0 1px, transparent 1px 14.28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.9) 0 1px, transparent 1px 20%);
}

.full-preview span:nth-child(3) {
  right: 14%;
  bottom: 10%;
  width: 46%;
  height: 4%;
}

.stacked-preview {
  background:
    linear-gradient(180deg, #80532f 0 52%, transparent 52%),
    linear-gradient(135deg, #ded2be, #6f6557 68%, #24211e);
}

.stacked-preview span:nth-child(1) {
  top: 12%;
  left: 27%;
  width: 46%;
  height: 7%;
  background: #ffffff;
  opacity: 0.92;
}

.stacked-preview span:nth-child(2) {
  top: 24%;
  right: 15%;
  left: 15%;
  height: 20%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.86) 0 1px, transparent 1px 14.28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.86) 0 1px, transparent 1px 22%);
}

.stacked-preview span:nth-child(3) {
  right: 0;
  bottom: 0;
  left: 0;
  height: 48%;
  background: linear-gradient(135deg, #c9c0b5, #837263 62%, #2c2a29);
}

.split-preview {
  background: #f2eadc;
}

.split-preview span:nth-child(1) {
  inset: 9% 9% auto;
  height: 42%;
  background: linear-gradient(135deg, #d4b06f, #578991);
  border-radius: 4px;
}

.split-preview span:nth-child(2) {
  top: 58%;
  left: 12%;
  width: 50%;
  height: 7%;
  background: #151515;
}

.split-preview span:nth-child(3) {
  right: 12%;
  bottom: 10%;
  left: 12%;
  height: 25%;
  background:
    repeating-linear-gradient(90deg, rgba(21, 21, 21, 0.82) 0 1px, transparent 1px 14.28%),
    repeating-linear-gradient(0deg, rgba(21, 21, 21, 0.82) 0 1px, transparent 1px 20%);
}

.swatch-row,
.background-grid,
.texture-grid {
  display: grid;
  gap: 8px;
}

.swatch-row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding: 2px 48px 4px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.swatch-row::-webkit-scrollbar {
  display: none;
}

.swatch,
.background-swatch,
.texture-choice {
  min-height: 42px;
  background: #ffffff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  cursor: pointer;
}

.swatch {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 999px;
  scroll-snap-align: start;
}

.custom-color-swatch {
  position: relative;
  display: block;
  overflow: hidden;
  background: conic-gradient(#ef5d49, #f0c66a, #43b783, #2352a4, #7c5ac6, #ef5d49);
}

.custom-color-swatch::after {
  position: absolute;
  inset: 9px;
  background: var(--custom-color, #ffffff);
  border: 1px solid rgba(21, 21, 21, 0.18);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.custom-color-swatch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.swatch.is-active,
.background-swatch.is-active,
.texture-choice.is-active {
  border-color: #151515;
  box-shadow: inset 0 0 0 2px #151515;
}

.section-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.background-decor-controls {
  display: grid;
  gap: 8px;
}

.background-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 48px 4px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.background-grid::-webkit-scrollbar,
.texture-grid::-webkit-scrollbar {
  display: none;
}

.background-swatch {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  place-items: center;
  padding: 0;
  color: transparent;
  font-weight: 780;
  border-radius: 999px;
  scroll-snap-align: start;
}

.background-swatch.dark-label {
  color: transparent;
}

.texture-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 48px 4px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.texture-choice {
  position: relative;
  overflow: hidden;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  padding: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
  text-align: center;
  border-radius: 999px;
  scroll-snap-align: start;
}

.texture-choice::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.72;
}

.texture-choice::after {
  content: none;
}

.texture-none::before {
  background: #ffffff;
}

.texture-squares::before {
  background:
    linear-gradient(90deg, #c9f285 0 7px, transparent 7px 100%) 8px 8px / 19px 19px,
    linear-gradient(90deg, #f0c66a 0 7px, transparent 7px 100%) 17px 17px / 19px 19px,
    linear-gradient(90deg, #ef5d49 0 7px, transparent 7px 100%) 26px 8px / 19px 19px,
    #fffdf7;
}

.texture-dots::before {
  background:
    radial-gradient(circle, #8eeccc 0 4px, transparent 4.5px) 4px 4px / 17px 17px,
    #fffdf7;
}

.texture-outlineStars::before {
  display: grid;
  place-items: center;
  color: rgba(89, 89, 89, 0.72);
  background: #fffdf7;
  content: "☆ ☆\A ☆ ☆";
  font-size: 17px;
  line-height: 1.35;
  white-space: pre;
}

.range-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  min-height: 78px;
  margin-top: 4px;
  padding: 12px 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 760;
}

.range-field strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.range-field input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #151515;
}

.month-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 760;
}

.month-field input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: #f8f7f4;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  font: inherit;
  text-align: center;
}

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

.month-choice {
  min-height: 44px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 780;
}

.month-choice.is-active {
  border-color: #151515;
  box-shadow: inset 0 0 0 2px #151515;
}

.adjust-dock {
  position: fixed;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 14px;
  z-index: 18;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 74px;
  align-items: center;
  width: min(calc(100% - 28px), 452px);
  min-height: 58px;
  margin: 0 auto;
  padding: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(24, 22, 20, 0.18);
  backdrop-filter: blur(18px);
}

.adjust-dock[hidden] {
  display: none;
}

.adjust-dock span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.dock-button {
  min-height: 42px;
  color: var(--ink);
  background: #f3f1ed;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.dock-button.strong {
  color: #ffffff;
  background: #151515;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 18px;
  z-index: 40;
  width: min(calc(100% - 36px), 360px);
  margin: 0 auto;
  padding: 11px 14px;
  color: #ffffff;
  background: rgba(21, 21, 21, 0.9);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 720;
  text-align: center;
}

.toast[hidden] {
  display: none;
}

@media (min-width: 720px) {
  body {
    padding: 18px 0;
  }

  .app {
    min-height: calc(100dvh - 36px);
    border-radius: 24px;
  }

  .upload-screen,
  .studio {
    min-height: calc(100dvh - 36px);
  }

  .sheet {
    border-radius: 20px;
    margin-bottom: 18px;
  }
}
