.card-fields { margin: 16px 0; width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 12px; }
.card-fields legend { max-width: 100%; padding: 0 5px; }
.card-switch {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 58px;
  margin: 14px 0 !important;
  padding: 15px 20px 15px 58px;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 12px;
  border: 1px solid #71343a;
  border-radius: 12px;
  background: linear-gradient(135deg, #71343a 0%, #4d1d24 100%);
  box-shadow: 0 5px 14px #5b242a26, inset 0 1px 0 #ffffff20;
  color: #fffaf2;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.card-switch::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 25px;
  height: 25px;
  transform: translateY(-50%);
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff4df' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h3v3h-3zM19 14v2M14 19h3M20 19v2M19 17h2'/%3E%3C/svg%3E");
}
.card-switch:hover {
  background: linear-gradient(135deg, #7d3b42 0%, #59242b 100%);
  box-shadow: 0 8px 18px #5b242a33, inset 0 1px 0 #ffffff2b;
  transform: translateY(-1px);
}
.card-switch:active { transform: translateY(0); box-shadow: 0 3px 8px #5b242a26; }
.card-switch:focus-visible { outline: 3px solid #b87a68; outline-offset: 3px; }
@media (max-width: 420px) {
  .card-switch { min-height: 56px; padding: 13px 14px 13px 52px; font-size: 14px; }
  .card-switch::before { left: 15px; width: 23px; height: 23px; }
}
.card-switch input { accent-color: var(--wine); }
.card-fields input, .card-fields textarea { min-width: 0; max-width: 100%; }
.order input[type=file] { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.card-fields .flat { margin-top: 5px; }
#photo-status { overflow-wrap: anywhere; }
.card-editor-preview { margin-top: 12px; }
.gift-card { box-sizing: border-box; width: 100%; max-width: 100%; padding: clamp(16px, 3vw, 32px); text-align: center; border: 1px solid #e7d7bf; border-radius: 20px; background: #fbf1dc; color: #5b242a; font-family: Georgia, serif; overflow-wrap: anywhere; }
.gift-card h1, .gift-card h3 { font: normal clamp(24px, 4vw, 42px)/1.12 Georgia, serif; margin: 10px 0; }
.gift-card time { font: 600 13px system-ui, sans-serif; }
.gift-card img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(38vh, 260px); object-fit: contain; margin: 16px auto; border: 5px solid #fffdf8; box-sizing: border-box; border-radius: 5px; box-shadow: 0 3px 12px #5b242a18; }
.gift-card p { white-space: pre-wrap; font-size: clamp(16px, 2vw, 20px); line-height: 1.45; margin: 14px 0 2px; }
.gift-card .card-heart { font-size: 18px; color: #a13648; margin: 0; }
.card-page { margin: 0; min-height: 100vh; box-sizing: border-box; background: #f4e8d4; padding: 24px 12px; display: grid; place-items: center; }
.card-page main { width: min(100%, 610px); min-width: 0; padding: 0; margin: 0; }
.card-page .gift-card img { max-height: min(50vh, 420px); }
.export-qr { display: block; width: 65px; height: 65px; margin: 7px auto 2px; }
.export-card small { display: block; font-size: 12px; }
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .section-top { flex-wrap: wrap; }
}



