:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}

body {
  background:
    radial-gradient(ellipse at 10% 0%, rgb(250 220 234 / 48%), transparent 34rem),
    radial-gradient(ellipse at 100% 20%, rgb(219 232 248 / 55%), transparent 30rem),
    #f8f6f7;
}

button,
input,
select,
textarea {
  font: inherit;
}

.mode-tab {
  min-height: 48px;
  border-radius: 0.9rem;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 750;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.mode-tab.is-active {
  background: white;
  color: #a21caf;
  box-shadow: 0 2px 8px rgb(15 23 42 / 9%);
}

.field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 750;
}

.field-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field-input:focus {
  border-color: #d946ef;
  box-shadow: 0 0 0 3px rgb(217 70 239 / 14%);
}

.field-help {
  margin-top: 0.35rem;
  color: #94a3b8;
  font-size: 0.75rem;
}

.required-mark {
  margin-left: 0.4rem;
  border-radius: 0.4rem;
  background: #fff1f2;
  padding: 0.15rem 0.4rem;
  color: #e11d48;
  font-size: 0.65rem;
  vertical-align: 0.1rem;
}

.avatar-preview {
  display: grid;
  width: 3.75rem;
  height: 3.75rem;
  flex: 0 0 3.75rem;
  place-items: center;
  overflow: hidden;
  border-radius: 9999px;
  background: #fce7f3;
  color: #be185d;
  font-size: 1.4rem;
  font-weight: 500;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-option {
  display: flex;
  min-height: 70px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 650;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.theme-option:has(input:checked) {
  border-color: #d946ef;
  background: #fdf4ff;
  color: #86198f;
}

.theme-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.theme-option input:focus-visible + .theme-swatch {
  outline: 3px solid #d946ef;
  outline-offset: 3px;
}

.theme-swatch {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid white;
  border-radius: 9999px;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgb(15 23 42 / 10%);
}

.check-list {
  display: grid;
  gap: 0.5rem;
}

.check-option {
  display: flex;
  min-height: 44px;
  cursor: pointer;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid #edf0f4;
  border-radius: 0.75rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.84rem;
}

.check-option input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #c026d3;
}

.primary-button,
.share-button {
  display: flex;
  min-height: 54px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 0;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 140ms ease, filter 140ms ease;
}

.primary-button {
  background: linear-gradient(110deg, #c026d3, #e34f9a);
  color: white;
  box-shadow: 0 8px 18px rgb(192 38 211 / 20%);
}

.share-button {
  border: 1px solid #d8e1eb;
  background: #fff;
  color: #1d9bf0;
}

.primary-button:hover,
.share-button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

[hidden] {
  display: none !important;
}

.layout-option {
  position: relative;
  display: flex;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 0.9rem 0.6rem 0.8rem;
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.layout-option:has(input:checked) {
  border-color: #d946ef;
  background: #fdf4ff;
}

.layout-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.layout-option:has(input:focus-visible) {
  outline: 3px solid #d946ef;
  outline-offset: 2px;
}

.layout-name {
  font-size: 0.9rem;
  font-weight: 800;
}

.layout-option:has(input:checked) .layout-name {
  color: #a21caf;
}

.layout-desc {
  color: #94a3b8;
  font-size: 0.7rem;
}

.layout-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.4rem;
  box-shadow: 0 0 0 1px rgb(15 23 42 / 10%);
}

.layout-thumb--standard {
  width: 5.2rem;
  height: 3.15rem;
  background: #fff;
}

.layout-thumb--standard i {
  position: absolute;
  inset: 0 0 62% 0;
  background: #f2a9bd;
}

.layout-thumb--standard b {
  position: absolute;
  left: 10%;
  top: 46%;
  width: 36%;
  height: 40%;
  border-radius: 0.2rem;
  background: #fff4f7;
}

.layout-thumb--standard em {
  position: absolute;
  right: 10%;
  top: 50%;
  width: 36%;
  height: 0.35rem;
  border-radius: 1rem;
  background: #fde2ea;
  box-shadow: 0 0.6rem 0 #fde2ea;
}

.layout-thumb--photo {
  width: 3.15rem;
  height: 5.2rem;
  background: linear-gradient(160deg, #e9d5c3, #b8a3c9 55%, #6f7b99);
}

.layout-thumb--photo i {
  position: absolute;
  left: 12%;
  top: 28%;
  width: 62%;
  height: 0.5rem;
  border: 2px solid #fff;
  border-radius: 0.2rem;
  background: #2a2a2e;
}

.layout-thumb--photo b {
  position: absolute;
  left: 10%;
  bottom: 8%;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.2rem;
  background: #fff;
  box-shadow: inset 0 0 0 0.2rem #fff, inset 0 0 0 0.45rem #333;
}

.photo-preview {
  display: grid;
  width: 3.4rem;
  height: 5.6rem;
  flex: 0 0 3.4rem;
  place-items: center;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #fce7f3;
  color: #be185d;
  font-size: 1.4rem;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.orientation-option {
  position: relative;
  display: flex;
  min-height: 48px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 0.9rem;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 750;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.orientation-option small {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.75;
}

.orientation-option:has(input:checked) {
  background: white;
  color: #a21caf;
  box-shadow: 0 2px 8px rgb(15 23 42 / 9%);
}

.orientation-option:has(input:focus-visible) {
  outline: 3px solid #d946ef;
  outline-offset: 2px;
}

.orientation-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.orientation-icon {
  display: block;
  border: 2px solid currentColor;
  border-radius: 0.2rem;
}

.orientation-icon--portrait {
  width: 0.85rem;
  height: 1.3rem;
}

.orientation-icon--landscape {
  width: 1.3rem;
  height: 0.85rem;
}

.photo-preview.is-landscape {
  width: 5.6rem;
  height: 3.4rem;
  flex-basis: 5.6rem;
}
