.sc-card {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0 auto;
  color: #111;
  background: #fff;
}
.sc-card.portrait { width: min(280px, 86vw); aspect-ratio: 54 / 85; }
.sc-card.landscape { width: min(360px, 94vw); aspect-ratio: 85 / 54; }
.sc-card .sc-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  pointer-events: none;
}
.sc-card.photo-cover .sc-card-bg { filter: brightness(.72); }
.sc-card .sc-card-inner {
  position: relative; z-index: 1;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.sc-card.landscape .sc-card-inner { flex-direction: row; gap: 12px; align-items: center; }
.sc-card .sc-card-photo {
  overflow: hidden; flex-shrink: 0;
  background: rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.sc-card .sc-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-card.photo-small .sc-card-photo { width: 48px; height: 48px; border-radius: 10px; font-size: 18px; }
.sc-card.photo-large.portrait .sc-card-photo { width: 100%; height: 44%; border-radius: 12px; margin-bottom: 10px; font-size: 36px; }
.sc-card.photo-large.landscape .sc-card-photo { width: 42%; height: 78%; border-radius: 12px; font-size: 32px; }
.sc-card.photo-none .sc-card-photo,
.sc-card.photo-cover .sc-card-photo { display: none; }
.sc-card .sc-card-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.sc-card .sc-card-name { line-height: 1.2; word-break: break-word; }
.sc-card.name-sm .sc-card-name { font-size: 14px; }
.sc-card.name-md .sc-card-name { font-size: 20px; }
.sc-card.name-lg .sc-card-name { font-size: 28px; }
.sc-card.name-thin .sc-card-name { font-weight: 400; }
.sc-card.name-bold .sc-card-name { font-weight: 800; }
.sc-card.name-v .sc-card-name {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: .12em;
  max-height: 70%;
}
.sc-card .sc-card-id { font-size: 10px; opacity: .6; margin-top: 6px; letter-spacing: .02em; }
.sc-card.name-v .sc-card-id { writing-mode: horizontal-tb; }
.sc-card .sc-card-qr {
  width: 72px; height: 72px; background: #fff; padding: 4px; border-radius: 8px; flex-shrink: 0;
}
.sc-card .sc-card-qr img, .sc-card .sc-card-qr canvas { width: 100% !important; height: 100% !important; }
.sc-card.portrait .sc-card-qr { margin-top: auto; align-self: flex-end; }

.sc-card.simple { border: 1px solid #e4e4e7; border-radius: 16px; }
.sc-card.deluxe {
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}
.sc-card.deluxe:not(.has-custom-bg) {
  background: linear-gradient(160deg, #111 0%, #1f2937 55%, #0f172a 100%);
  color: #f8fafc;
}
.sc-card.typo { border: 2px solid currentColor; border-radius: 4px; }
.sc-card.typo .sc-card-name {
  font-family: "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
  letter-spacing: .06em;
}

.sc-card-studio-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px;
}
.sc-card-studio-grid.cols3 { grid-template-columns: 1fr 1fr 1fr; }
.sc-card-studio-grid.cols4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.sc-card-studio-grid button {
  border: 1px solid #e4e4e7; background: #fff; border-radius: 10px;
  padding: 10px 6px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.sc-card-studio-grid button.on { background: #111; color: #fff; border-color: #111; }
.sc-card-stage { padding: 16px 8px 24px; display: flex; justify-content: center; }
.sc-card-colors { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 14px; }
.sc-card-colors label { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sc-card-colors input[type=color] { width: 42px; height: 32px; border: none; background: transparent; padding: 0; }
