/*------------------------------------

font.css

------------------------------------*/

:root {
  --main: #4f46e5; /* くすみ紫 */
  --sub: #eef2ff;
  --accent: #f9a8d4; /* 淡いピンク */
  --text: #334155;
  --bg: #fafafa;
}

body {
  background: var(--bg);
  font-family: "Noto Sans JP", sans-serif;
  margin: 0;
}

/*------------------------------------
 header
------------------------------------*/
.page-ttl {
  background: url("../images/bg_main.png") no-repeat center center / cover;
  padding: 3% 0;
  margin: 2em;
}
.page-ttl .ttl {
  color: var(--main);
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-align: center;
}
.page-ttl .ttl:after {
  content: "";
  display: block;
  background: var(--accent);
  width: 6em;
  height: 5px;
  border-radius: 10px;
  margin: 0 auto;
}

/*------------------------------------
スマホサイズ
------------------------------------*/
@media screen and (max-width: 768px) {
  .page-ttl {
    background: url("../images/bg_main_sp.png") no-repeat center center / cover;
    padding: 5% 0;
    margin: 0;
  }
  .page-ttl .ttl {
    font-size: 24px;
  }
  .page-ttl .ttl:after {
    width: 6em;
    height: 5px;
    margin: 0.5em auto;
  }
}

/*------------------------------------
 main
------------------------------------*/

.inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 1em 1.5em 4em;
}

/* lead */
.lead {
  color: var(--text);
  font-size: 16px;
  line-height: 2.2;
  text-align: center;
  margin-bottom: 3.5em;
}

.lead p span {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--main);
  font-size: inherit;
  font-weight: bold;
}

/* main-block */
.main-block {
  background: var(--sub);
  border-radius: 16px;
  padding: 3.5em 0;
}
.main-block .main-inner {
  max-width: 600px;
  margin: 0 auto;
}
.main-block .main-inner > p {
  color: var(--text);
  font-size: 16px;
  margin: 0 0 1.2em;
}
.main-block input {
  font-size: 18px;
  line-height: 1.8;
  border: none;
  border-radius: 5px;
  box-sizing: border-box;
  padding: 0.8em 1.6em;
  display: block;
  width: 100%;
}
.main-block button {
  color: #fff;
  background: var(--main);
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.2em;
  padding: 0.8em 2em;
  display: block;
  width: 60%;
  margin: 2.5em auto;
}
.main-block .result-block {
  background: #fff;
  font-family:
    Fira Mono,
    DejaVu Sans Mono,
    Menlo,
    Consolas,
    Liberation Mono,
    Monaco,
    Lucida Console,
    monospace;
  font-size: 20px;
  line-height: 1.8;
  overflow-wrap: break-word;
  border: none;
  border-radius: 8px;
  box-sizing: border-box;
  padding: 1.2em 1.6em;
  display: block;
  width: 100%;
  min-height: 68px;
}
.main-block .result-block p {
  margin: 0;
}
.main-block .result-block .result-row {
  display: flex;
  align-items: baseline;
  gap: 0.8em;
}
.main-block .result-block .result-row + .result-row {
  margin-top: 0.6em;
  padding-top: 0.6em;
  border-top: 1px dashed #c7d2fe;
}
.main-block .result-block .result-label {
  color: var(--main);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 5.5em;
  white-space: nowrap;
}
.main-block .result-block .result-value {
  flex: 1 1 auto;
  word-break: break-all;
}
/* copy button */
.main-block .result-block .copy-btn {
  flex: 0 0 auto;
  align-self: center;
  position: relative;
  color: var(--main);
  background: var(--sub);
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  visibility: hidden;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}
.main-block .result-block.has-result .copy-btn {
  visibility: visible;
}
.main-block .result-block .copy-btn:hover {
  background: #dfe3ff;
}
.main-block .result-block .copy-btn:active {
  transform: scale(0.92);
}
.main-block .result-block .copy-btn .copy-feedback {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--main);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.main-block .result-block .copy-btn.is-copied .copy-feedback {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* balloon */
.balloon {
  text-align: center;
  margin-top: -0.5em;
  margin-bottom: 2em;
}
.balloon.is-hidden {
  visibility: hidden;
}
.balloon p {
  color: var(--main);
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 50px;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.15);
  font-size: 16px;
  font-weight: 700;
  padding: 1em 3em;
  display: inline-block;
  position: relative;
}
/* 吹き出しの口（縁取り用の下地） */
.balloon p:before {
  content: "";
  position: absolute;
  top: -37px;
  left: 50%;
  margin-left: -16px;
  border: 16px solid transparent;
  border-bottom: 20px solid var(--accent);
}
/* 吹き出しの口（白い本体） */
.balloon p:after {
  content: "";
  position: absolute;
  top: -32px;
  left: 50%;
  margin-left: -14px;
  border: 14px solid transparent;
  border-bottom: 18px solid #fff;
}
/* 表示されたときにふわっと出す */
.balloon:not(.is-hidden) p {
  animation: balloon-pop 0.4s ease;
}
@keyframes balloon-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/*------------------------------------
スマホサイズ
------------------------------------*/

@media screen and (max-width: 768px) {
  .inner {
    padding: 0 3%;
  }
  /* lead */
  .lead {
    font-size: 16px;
    margin: 8%;
  }
  .lead p {
    margin-bottom: 2em;
  }

  .lead p span {
    font-size: inherit;
  }

  /* main-block */
  .main-block {
    background: var(--sub);
    border-radius: 10px;
    padding: 2em 0;
  }
  .main-block .main-inner {
    padding: 0 5%;
  }
  .main-block .main-inner > p {
    color: var(--text);
    text-align: center;
  }
  .main-block button {
    margin: 1.5em auto;
  }

  /* result */
  .main-block .result-block .result-row {
    flex-direction: column;
    gap: 0.2em;
  }
  .main-block .result-block .result-label {
    flex: 0 0 auto;
  }
  .main-block .result-block .copy-btn {
    align-self: flex-end;
  }

  /* balloon */
  .balloon p {
    font-size: 14px;
  }
}

/*------------------------------------
 footer
------------------------------------*/
.f-footer {
  color: #fff;
  background: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.f-footer .f-author {
  margin-right: 1em;
}
