/**
 * 喫茶店の画像UIに重ねる文字組み。
 * 装飾を描かず、和文の禁則・行長・文字の安全な内側余白だけを扱う。
 */
body {
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}

/* せりふは短い意味のまとまりを守り、枠の幅に応じて句ごとに折り返す。 */
.dialogue-heading {
  align-items: baseline;
  column-gap: 1.5rem;
}
.dialogue-heading h2 {
  min-width: 0;
  font-size: clamp(21px, 2.05vw, 29px);
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: .025em;
  margin-block: .35em .4em;
  text-wrap: balance;
}
.dialogue-phrase {
  display: inline-block;
  white-space: nowrap;
}
.dialogue-number {
  flex-shrink: 0;
}
.dialogue-copy {
  max-width: 62em;
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: .015em;
  text-wrap: pretty;
  margin-bottom: 15px;
}
.speaker {
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .07em;
}
.availability {
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .02em;
  white-space: nowrap;
}
.field-help,
.preview-export > span {
  font-size: 11px;
  line-height: 1.85;
  letter-spacing: .015em;
  text-wrap: pretty;
}

/* 長いアカウント名や表示名にも文字領域を確保する。 */
.handle-field input {
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: .025em;
}
.handle-field input::placeholder {
  font-size: 15px;
  letter-spacing: .025em;
}
.profile-line {
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px 18px;
}
.profile-line > div {
  min-width: 0;
  max-width: 65%;
  flex-wrap: wrap;
  gap: 2px 12px;
}
.profile-line strong {
  min-width: 0;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.profile-line a,
#dashboard-account,
#blend-account {
  overflow-wrap: anywhere;
}
.profile-line a {
  font-size: 12px;
  line-height: 1.7;
}
#post-count {
  flex-shrink: 0;
  white-space: nowrap;
}
.profile-line > button {
  flex-shrink: 0;
}
.jar-name,
.bag-label {
  font-family: var(--latin), var(--sans);
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}
.jar-name {
  font-size: clamp(9px, 1vw, 15px);
}
.bag-label {
  font-size: clamp(9px, 1vw, 14px);
}

/* 画像ボタンの飾り・端のアイコンと文字を離す。ラベルは途中で切らない。 */
.primary-button,
.secondary-button {
  min-width: 0;
  min-height: 58px;
  gap: 12px;
  padding-inline: 18%;
  padding-block: 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .035em;
  text-wrap: balance;
}
.primary-button > span:first-child,
.secondary-button > span:first-child {
  min-width: 0;
}
.primary-button > span[aria-hidden='true'] {
  flex: 0 0 auto;
}
.export-actions .secondary-button,
.menu-actions .primary-button {
  font-size: 12px;
  padding-inline: 18%;
}
.preview-export .text-link,
.evidence-trigger,
#palette-method {
  font-size: 11px;
  line-height: 1.85;
}

/* 商品紹介のように、タイトル→説明→項目の順を読みやすく保つ。 */
.menu-copy {
  min-width: 0;
}
.menu-copy > .eyebrow {
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .17em;
}
.menu-copy > h2 {
  max-width: 19em;
  font-size: clamp(29px, 3.15vw, 44px);
  line-height: 1.6;
  font-weight: 600;
  letter-spacing: .025em;
  text-wrap: balance;
  overflow-wrap: break-word;
  margin-block: 12px 22px;
}
.result-summary,
.palette-detail p,
.insight-part {
  max-width: 43em;
  font-size: 14px;
  line-height: 2.05;
  letter-spacing: .02em;
  text-wrap: pretty;
}
.result-summary {
  margin-block: 0 22px;
}
.flavor-strip > span {
  font-size: 12px;
  line-height: 1.65;
  white-space: nowrap;
}
.result-tabs {
  gap: 8px;
  padding-bottom: 5px;
}
.result-tabs button {
  flex-shrink: 0;
  min-height: 40px;
  padding-inline: 12px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .02em;
  white-space: nowrap;
}
.palette-choice {
  min-width: 0;
  padding: 13px 12px;
}
.palette-choice span {
  font-size: 12px;
  line-height: 1.7;
  text-wrap: balance;
}
.palette-choice strong {
  font-size: 28px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.palette-choice small {
  font-size: 10px;
  line-height: 1.8;
}
.palette-detail h4,
.insight h3 {
  font-size: 22px;
  line-height: 1.7;
  letter-spacing: .025em;
  text-wrap: balance;
}
.insight-part strong,
.reflection > span,
.master-note > span {
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .025em;
}
.reading-tabs {
  column-gap: 14px;
  row-gap: 8px;
  flex-wrap: wrap;
}
.reading-tabs button {
  min-height: 34px;
  padding-inline: 8px;
  font-size: 12px;
  line-height: 1.7;
}
.reflection p,
.master-note p {
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: .025em;
  text-wrap: pretty;
}
.result-caveat,
.export-help {
  font-size: 11px;
  line-height: 1.95;
  letter-spacing: .01em;
  text-wrap: pretty;
}
.menu-toolbar {
  align-items: baseline;
  flex-wrap: wrap;
  row-gap: 12px;
}
.menu-toolbar > div {
  flex-wrap: wrap;
  row-gap: 10px;
}
.menu-top,
.menu-bottom {
  align-items: baseline;
  flex-wrap: wrap;
  row-gap: 6px;
}

/* 抽出の主役はカップ。説明の行長を抑えて重なりを防ぐ。 */
.brewing-caption h2 {
  max-width: 18em;
  line-height: 1.75;
  letter-spacing: .03em;
  text-wrap: balance;
}
.brewing-caption p {
  max-width: 28em;
  font-size: 13px;
  line-height: 2;
  letter-spacing: .02em;
  text-wrap: pretty;
}
.welcome-heading h1 {
  letter-spacing: .04em;
  line-height: 1.7;
}
.welcome-heading > p:last-child {
  font-size: 13px;
  line-height: 2.1;
  letter-spacing: .025em;
}

/* 投稿の原文には改行を残し、URLだけは枠内で折り返す。 */
.evidence-dialog h2 {
  font-size: 26px;
  line-height: 1.7;
  text-wrap: balance;
}
.evidence-dialog p {
  max-width: 42em;
  font-size: 14px;
  line-height: 2;
  letter-spacing: .015em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.evidence-dialog a {
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.evidence-pager button {
  min-height: 40px;
  font-size: 11px;
  line-height: 1.6;
}
.notice {
  font-size: 12px;
  line-height: 1.9;
  text-wrap: pretty;
}
.download-status {
  line-height: 1.8;
  text-wrap: pretty;
}

@media (min-width: 601px) and (max-width: 1000px) {
  .conversation {
    padding-inline: 40px;
  }
  #handle-form {
    grid-template-columns: minmax(0, 1fr) minmax(235px, .8fr);
  }
  .primary-button,
  .secondary-button {
    font-size: 12px;
    padding-inline: 18%;
  }
  .tasting-layout {
    gap: 5%;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  }
  .menu-copy > h2 {
    font-size: 31px;
  }
  .palette-choice {
    padding-inline: 9px;
  }
  .palette-choice span {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .conversation {
    padding: 26px 26px 21px;
  }
  .dialogue-heading {
    display: block;
  }
  .dialogue-heading h2 {
    font-size: clamp(18px, 4.9vw, 21px);
    line-height: 1.75;
    letter-spacing: .02em;
    margin-block: 9px 13px;
  }
  .dialogue-phrase {
    display: block;
  }
  .speaker {
    font-size: 11px;
    letter-spacing: .045em;
  }
  .availability {
    font-size: 9px;
    padding-left: 6px;
  }
  .dialogue-copy,
  .preview .dialogue-copy {
    font-size: 12px;
    line-height: 1.95;
    letter-spacing: .01em;
    margin-bottom: 14px;
  }
  .field-help,
  .preview-export > span {
    font-size: 10px;
    line-height: 1.85;
  }
  .primary-button,
  .secondary-button {
    min-height: 52px;
    padding: 11px 18%;
    gap: 10px;
    font-size: 12px;
    letter-spacing: .015em;
  }
  .handle-field input {
    font-size: 16px;
    line-height: 1.6;
  }
  .handle-field input::placeholder {
    font-size: 14px;
  }
  .profile-line {
    gap: 6px 10px;
    margin-bottom: 13px;
  }
  .profile-line > div {
    max-width: 100%;
    flex-basis: 100%;
    gap: 2px 8px;
  }
  .profile-line strong {
    font-size: 15px;
    line-height: 1.7;
  }
  .profile-line a {
    font-size: 11px;
  }
  .profile-line > button {
    margin-left: auto;
    font-size: 10px;
  }
  #post-count {
    font-size: 9px;
  }
  .preview-export .text-link {
    font-size: 11px;
    line-height: 1.85;
  }
  .preview-export > span {
    margin-top: 6px;
  }
  .conversation-foot {
    padding-top: 12px;
  }
  .steps {
    font-size: 9px;
    gap: 14px;
  }
  .welcome-heading h1 {
    font-size: 23px;
    line-height: 1.7;
    letter-spacing: .025em;
  }
  .menu-copy > .eyebrow {
    font-size: 9px;
    letter-spacing: .16em;
  }
  .menu-copy > h2 {
    font-size: 30px;
    line-height: 1.65;
    margin-block: 12px 18px;
  }
  .result-summary,
  .palette-detail p,
  .insight-part {
    font-size: 14px;
    line-height: 2.05;
    letter-spacing: .015em;
  }
  .flavor-strip {
    gap: 7px;
    margin-block: 21px 25px;
  }
  .flavor-strip > span {
    font-size: 11px;
    letter-spacing: .015em;
    padding-inline: 10px;
  }
  .result-tabs {
    gap: 6px;
    margin-top: 12px;
  }
  .result-tabs button {
    font-size: 12px;
    padding: 10px 11px;
  }
  .palette-legend {
    gap: 7px;
  }
  .palette-choice {
    padding: 12px 9px;
  }
  .palette-choice span {
    font-size: 11px;
    line-height: 1.7;
  }
  .palette-choice strong {
    font-size: 27px;
    line-height: 1.55;
  }
  .palette-choice small {
    font-size: 9px;
  }
  .palette-detail h4,
  .insight h3 {
    font-size: 21px;
    line-height: 1.75;
  }
  .reflection p,
  .master-note p {
    font-size: 14px;
    line-height: 2;
    letter-spacing: .015em;
  }
  .result-caveat,
  .export-help {
    font-size: 10px;
    line-height: 1.95;
  }
  .export-actions .secondary-button,
  .menu-actions .primary-button {
    font-size: 11px;
    line-height: 1.75;
    padding-inline: 18%;
  }
  .menu-toolbar,
  .menu-toolbar > div {
    gap: 8px 13px;
  }
  .menu-toolbar .text-link {
    font-size: 10px;
  }
  .menu-top span:first-child,
  .menu-bottom span:first-child {
    font-size: 7px;
    line-height: 1.8;
  }
  .menu-top span:last-child,
  .menu-bottom span:last-child {
    font-size: 10px;
    line-height: 1.8;
  }
  .evidence-dialog {
    padding: 24px;
  }
  .evidence-dialog h2 {
    font-size: 23px;
    line-height: 1.75;
    margin-block: 21px 18px;
  }
  .evidence-dialog p {
    font-size: 13px;
    line-height: 2;
  }
  .evidence-pager button {
    padding-inline: 8px;
    font-size: 10px;
  }
  .evidence-pager span {
    font-size: 10px;
  }
  .brewing-caption p {
    font-size: 12px;
    line-height: 2;
    max-width: 26em;
  }
  body[data-scene='extract'] .brewing-caption h2,
  body[data-scene='finish'] .brewing-caption h2 {
    font-size: clamp(23px, 6.2vw, 28px);
    line-height: 1.75;
    letter-spacing: .02em;
  }
  .notice {
    font-size: 11px;
    line-height: 1.95;
  }
}

@media (max-width: 360px) {
  .conversation {
    padding-inline: 24px;
  }
  .dialogue-heading h2 {
    font-size: 18px;
    letter-spacing: 0;
  }
  .speaker {
    font-size: 10px;
  }
  .availability {
    font-size: 8px;
  }
  .primary-button,
  .secondary-button {
    padding-inline: 16%;
    font-size: 11px;
    gap: 6px;
  }
  .export-actions {
    flex-direction: column;
    gap: 9px;
  }
  .menu-copy > h2 {
    font-size: 27px;
  }
  .palette-legend {
    gap: 5px;
  }
  .palette-choice {
    padding-inline: 7px;
  }
  .palette-choice span {
    font-size: 10px;
  }
  .palette-choice strong {
    font-size: 25px;
  }
  .menu-toolbar {
    align-items: flex-start;
  }
  .menu-toolbar > div {
    gap: 8px 10px;
  }
}
