@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Zen+Maru+Gothic:wght@400;500;700;900&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=DotGothic16&display=swap");

:root {
  --bg-page: #FFF9F2;
  --bg-surface: #FFFFFF;
  --bg-sunken: #FBF3E7;
  --pink-50: #FFEEF2;
  --pink-500: #FF6E96;
  --pink-700: #D43A6A;
  --sky-50: #EAF6FF;
  --sky-500: #4DAEFF;
  --lemon-50: #FFF7D6;
  --lemon-300: #FFE066;
  --lemon-500: #F5C400;
  --mint-50: #E6FBF1;
  --mint-500: #2EBC7F;
  --orange-500: #FF8A3D;
  --ink-900: #1F160C;
  --ink-700: #3A2E22;
  --ink-500: #6B5B49;
  --ink-300: #B7AB99;
  --ink-200: #DACFBE;
  --ink-100: #ECE3D3;
  --fg-1: var(--ink-900);
  --fg-2: var(--ink-700);
  --fg-3: var(--ink-500);
  --font-display: "Zen Maru Gothic", "Noto Sans JP", system-ui, sans-serif;
  --font-headline: "Zen Kaku Gothic New", "Noto Sans JP", system-ui, sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-mono: "DotGothic16", "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--fg-1);
  background: var(--bg-page);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app {
  min-height: 100dvh;
  background: var(--bg-page);
}

.shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 0 18px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 4px 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.seal {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--ink-900);
  border-radius: 50%;
  background: var(--pink-500);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
}

.mono {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.hero {
  padding: 24px 4px 14px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 10vw, 48px);
  font-weight: 900;
  line-height: 1.24;
  letter-spacing: 0;
}

.marker {
  display: inline;
  padding: 0 5px 2px;
  background: var(--lemon-300);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.cry-list {
  display: grid;
  gap: 10px;
  padding: 8px 0 24px;
}

.cry-card,
.panel,
.board,
.form-card,
.certificate-card,
.dashboard-card {
  border: 2px solid var(--ink-900);
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink-900);
}

.cry-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
}

.avatar-dot {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1.5px solid var(--ink-900);
  border-radius: 50%;
  background: var(--grade-color);
}

.cry-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.handle {
  min-width: 0;
  overflow: hidden;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grade-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid rgba(31, 22, 12, 0.15);
  border-radius: 999px;
  padding: 1px 7px;
  background: var(--grade-color);
  color: var(--grade-text);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.cry-text {
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.cta-block {
  padding: 0 0 28px;
}

.cta-title {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
}

.cta-lead {
  margin: 0 0 12px;
  color: var(--fg-2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.promise-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.promise-list span {
  border: 2px solid var(--ink-900);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink-900);
  color: var(--ink-900);
  font-size: 12px;
  font-weight: 900;
}

.button,
.secondary-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2.5px solid var(--ink-900);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 900;
  text-decoration: none;
}

.button {
  min-height: 62px;
  padding: 16px 22px;
  background: var(--pink-500);
  box-shadow: 5px 5px 0 var(--ink-900);
  color: #fff;
  font-size: 18px;
}

.button.dark {
  background: var(--ink-900);
  box-shadow: 4px 4px 0 var(--ink-900);
}

.secondary-button {
  min-height: 48px;
  padding: 12px 16px;
  background: var(--bg-page);
  color: var(--ink-900);
  font-size: 14px;
}

.dashboard-hero-button {
  margin-top: 18px;
}

.counter-text {
  margin-top: 10px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-align: center;
}

.sample-certificate {
  margin: 2px 0 28px;
}

.sample-stack {
  position: relative;
  min-height: 442px;
}

.sample-card {
  position: absolute;
  inset: 0;
  animation: sample-cycle 12s infinite;
  opacity: 0;
  transform: translateY(8px) rotate(-1deg);
}

.sample-card:nth-child(2) {
  animation-delay: 4s;
}

.sample-card:nth-child(3) {
  animation-delay: 8s;
}

.sample-certificate .grade-band {
  padding: 16px;
}

.sample-certificate .grade-key {
  font-size: 52px;
}

.sample-certificate .grade-name {
  font-size: 20px;
}

.sample-holder {
  display: grid;
  gap: 2px;
  border-bottom: 1.5px dashed var(--ink-300);
  padding: 13px 18px;
}

.sample-holder span,
.sample-holder small {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.sample-holder strong {
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
}

@keyframes sample-cycle {
  0%,
  28% {
    opacity: 1;
    transform: translateY(0) rotate(-1deg);
  }

  33%,
  100% {
    opacity: 0;
    transform: translateY(-8px) rotate(1deg);
  }
}

.clause {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 20px;
  padding: 20px 22px;
  background: var(--ink-900);
  color: #fff;
}

.clause::after {
  position: absolute;
  right: -20px;
  bottom: -48px;
  content: "3";
  color: var(--pink-500);
  font-family: var(--font-display);
  font-size: 180px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.2;
}

.clause-content {
  position: relative;
  z-index: 1;
}

.clause h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.3;
}

.clause p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.7;
}

.policy-list {
  display: grid;
  gap: 8px;
  padding-bottom: 28px;
}

.policy-item {
  border-bottom: 1.5px dashed var(--ink-300);
  padding: 10px 2px;
  font-size: 13px;
  line-height: 1.7;
}

.form-card {
  border-radius: 14px;
  padding: 18px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label,
.question-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
}

input {
  width: 100%;
  border: 2px solid var(--ink-900);
  border-radius: 10px;
  padding: 13px 12px;
  background: var(--bg-page);
  color: var(--ink-900);
  outline: none;
}

.note {
  color: var(--fg-3);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.65;
}

.question {
  padding: 16px 0;
  border-top: 1.5px dashed var(--ink-200);
}

.options {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1.5px solid var(--ink-900);
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--bg-page);
  color: var(--ink-900);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.option.selected {
  background: var(--lemon-300);
  box-shadow: 2px 2px 0 var(--ink-900);
}

.error {
  margin-top: 12px;
  border: 2px solid var(--pink-700);
  border-radius: 12px;
  padding: 12px;
  background: var(--pink-50);
  color: var(--pink-700);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.certificate-wrap {
  padding-top: 16px;
}

.status-pill {
  display: table;
  margin: 0 auto 12px;
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--mint-500);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.certificate-card {
  overflow: hidden;
  border-width: 3px;
  border-radius: 14px;
  background: var(--bg-page);
  box-shadow: 7px 7px 0 var(--grade-color), 11px 11px 0 var(--ink-900);
}

.cert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: var(--ink-900);
  color: #fff;
}

.cert-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
}

.cert-no {
  color: var(--lemon-300);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.grade-band {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 2.5px solid var(--ink-900);
  padding: 20px 18px;
  background: var(--grade-color);
  color: var(--grade-text);
}

.grade-key {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
}

.grade-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

.catch {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

.comparison {
  border-bottom: 1.5px dashed var(--ink-300);
  padding: 15px 18px 14px;
  text-align: center;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.comparison-label {
  color: var(--fg-2);
  font-size: 12px;
  line-height: 1.45;
}

.comparison-number {
  margin: 4px 0;
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 36px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
}

.comparison-number.big {
  font-size: 46px;
}

.cert-section {
  border-bottom: 1.5px dashed var(--ink-300);
  padding: 13px 18px;
  font-size: 13px;
  line-height: 1.7;
}

.cert-section.lemon {
  background: var(--lemon-50);
}

.cert-section-title {
  margin-bottom: 5px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px 14px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.share-area {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.divider-label {
  position: relative;
  margin: 28px 0 14px;
  text-align: center;
}

.divider-label::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  border-top: 1.5px dashed var(--ink-300);
  content: "";
}

.divider-label span {
  position: relative;
  padding: 0 12px;
  background: var(--bg-page);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.board {
  overflow: hidden;
  border-radius: 12px;
}

.board-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  border: 2px solid var(--ink-900);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink-900);
}

.board-form-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 132px) minmax(0, 1fr);
}

.board-form textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  border: 2px solid var(--ink-900);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--bg-page);
  color: var(--ink-900);
  font: inherit;
  outline: none;
}

.board-form .secondary-button {
  justify-self: end;
  width: auto;
  min-width: 128px;
}

.board-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-bottom: 1.5px dashed var(--ink-200);
}

.board-row:last-child {
  border-bottom: 0;
}

.dashboard-grid {
  display: grid;
  gap: 12px;
}

.dashboard-card {
  border-radius: 14px;
  padding: 16px;
}

.big-total {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.bar-row {
  display: grid;
  grid-template-columns: 76px 1fr 48px;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
}

.bar {
  height: 14px;
  overflow: hidden;
  border: 1.5px solid var(--ink-900);
  border-radius: 999px;
  background: var(--bg-sunken);
}

.bar-fill {
  height: 100%;
  min-width: 2px;
  background: var(--grade-color);
}

.recent-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1.5px dashed var(--ink-200);
  padding-bottom: 8px;
  font-size: 13px;
}

.loading {
  padding: 28px 0;
  color: var(--fg-3);
  font-family: var(--font-mono);
  text-align: center;
}

@media (min-width: 760px) {
  .shell {
    padding-right: 24px;
    padding-left: 24px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-card.wide {
    grid-column: 1 / -1;
  }
}

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

  .comparison-number {
    font-size: 30px;
  }

  .comparison-number.big {
    font-size: 40px;
  }

  .board-form-row {
    grid-template-columns: 1fr;
  }
}
