:root {
  --ink: #473348;
  --muted: #7b637d;
  --paper: #fffdf8;
  --pink: #ff67ad;
  --blue: #6bd5ff;
  --yellow: #ffe16b;
  --purple: #a986ff;
  --mint: #aef4d1;
  --line: rgba(92, 48, 82, 0.18);
  --shadow: 0 16px 38px rgba(126, 74, 117, 0.18);
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: #fff4fb;
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 103, 173, 0.2) 2px, transparent 3px) 0 0 / 28px 28px,
    linear-gradient(135deg, #fff2fb 0%, #fff8d6 48%, #eafaff 100%);
}

a { color: inherit; }
button, input, select, textarea, summary { font: inherit; }

.page {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 18px 16px 42px;
}

.kicker {
  margin: 0 0 8px;
  color: #cf3f86;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
}

.theme-pill {
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 13px;
  border: 2px solid rgba(240, 76, 159, 0.26);
  border-radius: 999px;
  background: #fff;
  color: #cf3f86;
  font-size: 0.88rem;
  font-weight: 900;
  box-shadow: 0 5px 0 rgba(240, 76, 159, 0.12);
}

.hero-copy .theme-pill,
.complete-hero .theme-pill {
  margin-left: auto;
  margin-right: auto;
}

.lead {
  color: var(--muted);
  line-height: 1.8;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid rgba(128, 68, 116, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 0 rgba(128, 68, 116, 0.12);
  cursor: pointer;
  text-align: center;
}

.button.primary {
  border-color: #f05da4;
  background: linear-gradient(180deg, #ff8ac1, #f557a3);
  color: #fff;
  text-shadow: 0 1px 0 rgba(122, 27, 85, 0.22);
}

.button.ghost { background: rgba(255, 255, 255, 0.72); }
.button.big { min-height: 56px; padding: 0 24px; font-size: 1.05rem; }
.x-button { border-color: #16181c; background: #16181c; color: #fff; }

.home-hero {
  display: grid;
  gap: 24px;
  padding: 18px 0 30px;
}

.hero-card-block {
  display: grid;
  gap: 10px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.home-hero h1,
.form-header h1,
.complete-hero h1 {
  margin: 0;
  font-size: clamp(2.15rem, 10vw, 5rem);
  line-height: 1.07;
  color: #f04c9f;
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(107, 213, 255, 0.46);
}

.home-hero h1 span {
  display: inline;
}

.home-hero .lead {
  max-width: 650px;
  margin: 18px 0 24px;
  font-size: 1.03rem;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2,
.form-section h2,
.make-yours h2,
.share-preview-section h2 {
  margin: 0;
  font-size: 1.45rem;
}

.section-heading.compact {
  text-align: center;
}

.sample-section {
  padding: 16px 0 30px;
}

.sample-grid {
  display: grid;
  gap: 16px;
}

.link-card-sample {
  position: relative;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 8px;
  padding: clamp(16px, 4vw, 34px);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 103, 173, 0.15);
  display: grid;
  align-content: center;
  gap: clamp(7px, 2vw, 14px);
}

.hero-link-card {
  min-height: 188px;
}

.link-card-sample::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(240, 76, 159, 0.35);
  border-radius: 8px;
  pointer-events: none;
}

.link-card-sample::after {
  content: "♡";
  position: absolute;
  right: 7%;
  top: 8%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #ff67ad;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(126, 74, 117, 0.16);
}

.sample-heisei {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.85) 0 13%, transparent 14%),
    linear-gradient(135deg, #ffe3f0, #fffdf8 56%, #e5faff);
}

.sample-puri {
  background:
    repeating-linear-gradient(-10deg, rgba(255, 255, 255, 0.32) 0 10px, transparent 10px 24px),
    linear-gradient(135deg, #dbf7ff, #fff9d8 48%, #ffe1f0);
}

.sample-ryosan {
  background:
    radial-gradient(circle at 82% 26%, rgba(255, 255, 255, 0.86) 0 11%, transparent 12%),
    linear-gradient(135deg, #fff1f7, #f2eaff 52%, #fffdf8);
}

.deco-strip {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 12px;
  display: flex;
  justify-content: space-between;
  color: #f04c9f;
  font-weight: 900;
  opacity: 0.88;
  pointer-events: none;
}

.sample-label {
  width: fit-content;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  color: #cf3f86;
  font-size: clamp(0.76rem, 2vw, 1rem);
  font-weight: 900;
  box-shadow: 0 5px 0 rgba(240, 76, 159, 0.14);
}

.link-card-sample h2,
.link-card-sample h3 {
  position: relative;
  margin: 0;
  max-width: 86%;
  color: #f04c9f;
  font-size: clamp(1.28rem, 5.6vw, 2.6rem);
  line-height: 1.12;
  text-shadow: 2px 2px 0 #fff;
  overflow-wrap: anywhere;
}

.sample-main {
  width: fit-content;
  max-width: 92%;
  padding: 8px 12px;
  border: 3px solid #70d4ff;
  border-radius: 8px;
  background: #fff;
  font-size: clamp(1rem, 4vw, 1.8rem);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.sample-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7d9;
  border: 2px solid rgba(240, 76, 159, 0.28);
  font-size: clamp(0.72rem, 2vw, 1rem);
  font-weight: 900;
}

.sample-message {
  margin: 0;
  max-width: 86%;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.maker-credit {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.link-card-sample .maker-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
}

.form-header {
  padding: 20px 0 14px;
}

.form-header h1 {
  font-size: clamp(2rem, 12vw, 4rem);
}

.back-link {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 900;
  text-decoration: none;
}

.profile-form {
  display: grid;
  gap: 18px;
  padding-bottom: 30px;
}

.form-section,
.sticker-board,
.profile-sheet,
.make-yours,
.share-preview-section {
  position: relative;
  border: 3px solid #fff;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 103, 173, 0.16);
}

.form-section {
  display: grid;
  gap: 22px;
  padding: 22px 18px;
}

.form-section::before,
.profile-sheet::before,
.share-preview-section::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(240, 76, 159, 0.24);
  border-radius: 8px;
  pointer-events: none;
}

.form-section h2 {
  position: relative;
  z-index: 1;
  color: #d53d8b;
}

label,
fieldset {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
  color: #6c516e;
  font-weight: 900;
}

legend { margin-bottom: 9px; }

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 2px solid rgba(128, 68, 116, 0.2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: 0;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #f05da4;
  box-shadow: 0 0 0 4px rgba(240, 93, 164, 0.16);
}

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

.segmented.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented label { display: block; }

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 2px solid rgba(128, 68, 116, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-weight: 900;
}

.segmented input:checked + span {
  border-color: #f05da4;
  background: #ffe5f0;
  color: #c8297a;
}

.optional-section {
  padding: 0;
  display: block;
}

.optional-section summary {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  padding: 18px;
  cursor: pointer;
  color: #d53d8b;
  font-weight: 900;
}

.optional-section summary small {
  color: var(--muted);
  font-size: 0.84rem;
}

.details-grid {
  display: grid;
  gap: 20px;
  padding: 0 18px 22px;
}

.counter {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.form-error {
  min-height: 22px;
  margin: 0;
  color: #bd0e58;
  font-weight: 900;
}

.submit-button { width: 100%; }

.theme-pink { background: linear-gradient(160deg, #ffe4f0, #fffdf8 58%, #e9fbff); }
.theme-blue { background: linear-gradient(160deg, #e0f8ff, #fffdf8 58%, #fff3bd); }
.theme-yellow { background: linear-gradient(160deg, #fff2a8, #fffdf8 58%, #ffe4f0); }
.theme-purple { background: linear-gradient(160deg, #eee7ff, #fffdf8 58%, #ffe4f0); }
.theme-black { background: linear-gradient(160deg, #3b3140, #fffdf8 62%, #ffd6e8); }
.theme-white { background: linear-gradient(160deg, #ffffff, #fff7fb 58%, #e8fbff); }

.complete-page {
  display: grid;
  gap: 18px;
}

.complete-hero {
  padding: 24px 16px;
  text-align: center;
}

.complete-hero h1 {
  font-size: clamp(2rem, 10vw, 4.2rem);
}

.share-preview-section {
  padding: 20px 14px 18px;
}

.share-preview-section > * {
  position: relative;
  z-index: 1;
}

.og-preview-wrap {
  margin: 16px auto 10px;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(92, 48, 82, 0.16);
  background: #fff;
}

.og-preview {
  display: block;
  width: 100%;
  height: auto;
}

.action-row {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.share-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.profile-sheet {
  padding: 20px 16px;
}

.profile-sheet > * {
  position: relative;
  z-index: 1;
}

.sheet-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sheet-title span {
  color: #cf3f86;
  font-size: 0.82rem;
  font-weight: 900;
}

.sheet-title h2 {
  margin: 0;
  color: #f04c9f;
  font-size: 1.8rem;
}

.field-grid {
  display: grid;
  gap: 10px;
}

.mini-field {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 2px solid rgba(128, 68, 116, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.mini-field span,
.message-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.mini-field strong { overflow-wrap: anywhere; }

.message-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #fff8d8;
}

.message-card p {
  margin: 8px 0 0;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.profile-sheet .maker-credit {
  margin-top: 14px;
}

.make-yours {
  padding: 22px 16px;
  text-align: center;
}

.make-yours p {
  color: var(--muted);
  line-height: 1.8;
}

.not-found {
  display: grid;
  min-height: 80vh;
  align-content: center;
  gap: 12px;
  text-align: center;
}

@media (min-width: 720px) {
  .page {
    padding: 28px 28px 56px;
  }

  .home-hero {
    min-height: 84vh;
    align-content: center;
  }

  .hero-card-block {
    max-width: 940px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-copy {
    text-align: center;
  }

  .home-hero .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .og-sample-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .required-section,
  .optional-section {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
  }

  .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .details-grid fieldset {
    grid-column: 1 / -1;
  }

  .action-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .link-card-sample {
    padding: 18px;
    gap: 5px;
    align-content: center;
  }

  .hero-link-card {
    min-height: 0;
  }

  .link-card-sample::before {
    inset: 8px;
  }

  .link-card-sample::after {
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
    right: 8%;
    top: 12%;
  }

  .deco-strip {
    left: 14px;
    right: 14px;
    top: 7px;
    font-size: 0.78rem;
  }

  .sample-label {
    padding: 4px 9px;
    max-width: 72%;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .link-card-sample h2,
  .link-card-sample h3 {
    max-width: 82%;
    font-size: 1.06rem;
    line-height: 1.08;
    text-shadow: 1.5px 1.5px 0 #fff;
  }

  .sample-main {
    max-width: 74%;
    padding: 6px 9px;
    border-width: 2px;
    font-size: 0.95rem;
    line-height: 1.15;
  }

  .sample-tags {
    gap: 4px;
  }

  .sample-tags span {
    padding: 3px 7px;
    border-width: 1px;
    font-size: 0.65rem;
  }

  .sample-message {
    max-width: 74%;
    font-size: 0.68rem;
    line-height: 1.22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-link-card .sample-message {
    display: none;
  }

  .link-card-sample .maker-credit {
    bottom: 7px;
    font-size: 0.58rem;
    line-height: 1.1;
  }

  .home-hero h1,
  .form-header h1,
  .complete-hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.1rem);
  }

  .home-hero h1 {
    font-size: 2.08rem;
    line-height: 1.1;
  }

  .home-hero h1 span {
    display: block;
  }
}

@media (max-width: 380px) {
  .link-card-sample {
    padding: 16px;
  }

  .link-card-sample h2,
  .link-card-sample h3 {
    max-width: 76%;
    font-size: 1.08rem;
  }

  .sample-main {
    max-width: 72%;
    font-size: 0.84rem;
  }

  .sample-tags span {
    font-size: 0.58rem;
    padding: 2px 6px;
  }
}
