/* 2474 / five-language layout. Load after the base and motion styles. */
html[lang="ja"] { --sans:"Space Grotesk","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,system-ui,sans-serif; }
html[lang="ko"] { --sans:"Space Grotesk","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif; }
html[lang="zh-TW"] { --sans:"Space Grotesk","PingFang TC","Microsoft JhengHei",system-ui,sans-serif; }
html[lang="en"] body { word-break:normal; }
html[lang="ja"] body { line-break:strict; word-break:normal; }
html[lang="ko"] body { word-break:keep-all; overflow-wrap:break-word; }

/* Translated labels are separate from the arrows, units and live-count hooks. */
.text-link > .i18n-text,
.inventory-link > .i18n-text,
.btn > .i18n-text {
  font:inherit;
  line-height:inherit;
  letter-spacing:inherit;
}
.form-field label > .i18n-label-text {
  font:inherit;
  color:inherit;
}
.artifact-name > .artifact-primary {
  display:block;
  margin:0;
  font-size:14px;
  line-height:1.6;
  color:#dad4c9;
  letter-spacing:0;
  font-family:var(--sans);
}
#heroTitle .hero-title-first { color:var(--paper); }
#heroTitle { white-space:normal; overflow-wrap:normal; }
html[lang="en"] #heroTitle {
  font-size:clamp(42px,5.2vw,74px);
  line-height:1.1;
  letter-spacing:-.065em;
}
html[lang="ja"] #heroTitle {
  font-size:clamp(32px,3.6vw,50px);
  line-height:1.3;
  letter-spacing:-.055em;
}
html[lang="ko"] #heroTitle {
  font-size:clamp(38px,4.5vw,65px);
  line-height:1.24;
  letter-spacing:-.06em;
}
#heroTitle > span { display:inline; }
.hero-description > .i18n-text { display:inline; }
html[lang="en"] .section-heading > p > br + .i18n-text::before,
html[lang="en"] .artifact-caption > br + .i18n-text::before {
  content:" ";
}
#faqTitle > .i18n-text { display:block; }
#faqTitle > br { display:none; }
html[lang="en"] .section-heading h2,
html[lang="ko"] .section-heading h2 { line-height:1.35; }

/* The native picker stays recognizable and works without a custom dropdown. */
.header-main { gap:24px; }
.language-control {
  position:relative;
  display:flex;
  align-items:center;
  flex:0 0 auto;
}
.language-control::after {
  content:"";
  position:absolute;
  right:11px;
  top:calc(50% - 3px);
  width:5px;
  height:5px;
  border-right:1px solid #aea49b;
  border-bottom:1px solid #aea49b;
  transform:rotate(45deg);
  pointer-events:none;
}
#languageSelect {
  display:block;
  width:112px;
  min-height:37px;
  appearance:none;
  -webkit-appearance:none;
  color-scheme:dark;
  border:1px solid #45413d;
  border-radius:4px;
  background:#17191a;
  padding:9px 26px 9px 11px;
  color:#d2c9bf;
  font-family:var(--sans);
  font-size:12px;
  line-height:1.5;
  cursor:pointer;
}
#languageSelect:hover { border-color:#80634f; }
#languageSelect option { color:#eae7de; background:#17191a; }
.wallet-connect { margin-left:0; flex-shrink:0; }
.main-nav { min-width:0; gap:24px; }
.main-nav a { white-space:nowrap; }
.header-status { align-items:flex-start; }
.header-status p { min-width:0; overflow-wrap:anywhere; }
.protocol-state { flex-shrink:0; max-width:210px; white-space:normal; text-align:right; }

/* Long copy can grow vertically; it never pushes inputs or live values out. */
.hero-copy,
.section-heading > div,
.section-heading > p,
.terminal-form,
.inventory-body,
.market-board,
.market-list,
.forge-controls,
.forge-body,
.archive-meta,
.story-copy,
.faq-list { min-width:0; }
.hero-actions { flex-wrap:wrap; gap:18px 25px; }
.hero-actions .btn { min-width:0; }
.hero-actions .text-link { max-width:100%; }
.hero-actions .text-link .i18n-text { min-width:0; }
.section-heading { align-items:flex-start; }
.section-heading > p { flex:0 1 400px; }
.section-heading h2 { overflow-wrap:break-word; }
.form-label-line { align-items:baseline; flex-wrap:wrap; gap:6px 12px; }
.form-label-line > span { max-width:100%; line-height:1.7; }
.form-field label { align-items:baseline; flex-wrap:wrap; gap:6px 15px; }
.form-field label > .i18n-label-text { flex:1; min-width:0; }
.purchase-breakdown > div { align-items:baseline; }
.purchase-breakdown > div > span { min-width:0; max-width:64%; }
.purchase-breakdown strong { min-width:0; overflow-wrap:anywhere; }
.panel-heading { align-items:flex-start; flex-wrap:wrap; gap:8px 14px; }
.panel-title { min-width:0; }
.panel-title > .i18n-text { min-width:0; }
.panel-heading .mono-label { flex-shrink:0; }
.protocol-metrics strong > span[data-i18n="s.units.fragments"] {
  font-size:12px;
  letter-spacing:0;
  margin-left:8px;
}
.protocol-metrics p,
.form-help,
.market-form-description,
.mode-copy p,
.market-proceeds-bar > p,
.story-copy,
.faq-list details > p,
.modal p { overflow-wrap:break-word; }
.mode-copy { min-width:0; }
.mode-badge { max-width:100%; white-space:normal; }
.mode-switch { min-width:0; }
.mode-switch button { white-space:normal; line-height:1.6; }
.market-fee-note { align-items:baseline; }
.market-fee-note > span { min-width:0; }
.market-fee-note > span > .i18n-text { margin-right:.25em; }
.market-fee-note small { max-width:100%; }
.market-filters button { line-height:1.6; }
.market-proceeds-bar > .btn { white-space:normal; }
.proceeds-amount > strong { overflow-wrap:anywhere; }
.forge-equation { align-items:flex-start; }
.forge-equation small { line-height:1.8; }
.forge-rule { flex-wrap:wrap; gap:4px 16px; }
.forge-rule strong { min-width:0; text-align:right; }
.forge-rule strong .i18n-text,
.forge-cost strong .i18n-text { margin-left:.25em; }
.archive-heading > p { min-width:0; }
.archive-heading > p > .i18n-text { margin-right:.35em; }
.archive-summary strong { overflow-wrap:anywhere; }
.demo-reset-row { flex-wrap:wrap; }
.demo-reset-row > p { flex:1 1 280px; }
.reset-link { white-space:normal; text-align:left; line-height:1.8; }
.story-index h2 { overflow-wrap:normal; }
.story-signature { flex-wrap:wrap; }
.faq-list summary { overflow-wrap:break-word; }
.footer-top { flex-wrap:wrap; }
.footer-top > p { min-width:0; }
.footer-bottom p { max-width:100%; }
.wallet-help-actions { flex-wrap:wrap; }
.wallet-help-actions .btn { min-width:160px; line-height:1.6; }
.modal h2 { line-height:1.4; overflow-wrap:break-word; }

@media(max-width:1150px) {
  .header-main { gap:18px; }
  .main-nav { gap:18px; }
  .main-nav a { font-size:11px; }
  #languageSelect { width:102px; }
  .hero-grid { align-items:center; }
  html[lang="en"] .hero-copy h1 { font-size:clamp(40px,5vw,60px); }
  html[lang="ja"] .hero-copy h1 { font-size:clamp(32px,3.8vw,43px); }
  html[lang="ko"] .hero-copy h1 { font-size:clamp(34px,4.6vw,53px); }
  .mode-copy { align-items:flex-start; flex-direction:column; gap:9px; }
}
@media(max-width:1050px) {
  .main-nav { display:none; }
  .language-control { margin-left:auto; }
  .wallet-connect { margin-left:0; }
  .header-main .brand small { display:block; }
}
@media(max-width:900px) {
  .section-heading > p { flex:0 1 330px; }
  .mode-section { align-items:flex-start; }
  .mode-switch { max-width:360px; }
  .mode-switch button { font-size:12px; }
  .protocol-metrics p { font-size:12px; }
  .protocol-metrics strong > span[data-i18n="s.units.fragments"] { font-size:11px; }
  .terminal-ledger { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .terminal-ledger > div { min-width:0; }
  .market-filters { align-items:stretch; }
  .market-filters button { min-width:0; }
  .market-proceeds-bar { align-items:flex-start; }
  .forge-equation > span { min-width:0; }
  .archive-summary { grid-template-columns:1.2fr 1.1fr .8fr .8fr; }
}
@media(max-width:600px) {
  .header-main { gap:10px; }
  .header-main .brand { font-size:24px; gap:8px; flex-shrink:0; }
  .header-main .brand small { display:none; }
  .header-main .brand-symbol { width:18px; gap:3px; }
  .header-main .brand-symbol i { width:3px; }
  .language-control { margin-left:auto; }
  #languageSelect { width:86px; min-height:37px; padding:8px 22px 8px 9px; font-size:12px; }
  .language-control::after { right:9px; width:4px; height:4px; }
  .wallet-connect { min-width:0; padding:9px 10px; gap:6px; font-size:12px; min-height:37px; }
  .header-status { gap:15px; }
  .header-status p { max-width:62%; font-size:12px; line-height:1.8; }
  .protocol-state { max-width:132px; font-size:10px; line-height:1.8; }
  html[lang="en"] .hero-copy h1 { font-size:clamp(34px,8.7vw,49px); line-height:1.12; letter-spacing:-.055em; }
  html[lang="ja"] .hero-copy h1 { font-size:clamp(28px,7.7vw,40px); line-height:1.35; letter-spacing:-.06em; }
  html[lang="ko"] .hero-copy h1 { font-size:clamp(32px,8.4vw,44px); line-height:1.3; letter-spacing:-.065em; }
  .hero-description { line-height:1.95; }
  .hero-actions { gap:16px 23px; align-items:center; }
  .hero-actions .btn { font-size:13px; gap:19px; }
  .hero-actions .text-link { font-size:12px; gap:18px; }
  .hero-note { font-size:12px; }
  .hero-art figcaption { font-size:11px; }
  .hero-art figcaption > span:first-child { max-width:76%; }
  .hero-art figcaption > span:last-child { font-size:7px; }
  .protocol-metrics > div { min-width:0; }
  .protocol-metrics p { font-size:12px; line-height:1.95; }
  .metric-price { font-size:12px; line-height:1.85; }
  .protocol-metrics strong > span[data-i18n="s.units.fragments"] { font-size:11px; margin-left:7px; }
  .mode-copy { width:100%; }
  .mode-switch { max-width:none; }
  .mode-switch button { font-size:12px; padding:8px 10px; }
  .mode-switch button .i18n-text { min-width:0; }
  .section-heading { gap:14px; }
  .section-heading > p { flex:none; max-width:100%; font-size:12px; }
  .section-heading h2 { font-size:26px; line-height:1.4; }
  html[lang="en"] .section-heading h2 { font-size:26px; }
  html[lang="ja"] .section-heading h2 { font-size:24px; line-height:1.5; }
  html[lang="ko"] .section-heading h2 { font-size:25px; line-height:1.5; }
  .panel-heading { align-items:flex-start; }
  .panel-heading .mono-label { font-size:8px; }
  .form-label-line { gap:6px 12px; }
  .form-label-line > span { font-size:12px; }
  .terminal-ledger > div { font-size:12px; line-height:1.9; }
  .terminal-ledger strong, .terminal-ledger b { font-size:15px; }
  .terminal-ledger small { font-size:11px; }
  .inventory-body { display:block; }
  .inventory-label { font-size:13px; }
  .inventory-balance { margin-top:12px; }
  .balance-unit { font-size:9px; }
  .inventory-divider { display:block; margin:23px 0 18px; }
  .inventory-row { display:flex; font-size:12px; }
  .inventory-body > .form-help { margin-top:13px; font-size:12px; }
  .inventory-link { margin-top:20px; font-size:12px; }
  .inventory-link.muted { margin-top:12px; }
  .market-fee-note { gap:10px 17px; }
  .market-fee-note > span { max-width:100%; }
  .market-fee-note small { line-height:1.8; }
  .market-filters button { flex:1; padding:9px 8px; font-size:12px; }
  .market-proceeds-bar > .btn { font-size:12px; min-height:44px; }
  .proceeds-amount { align-items:flex-start; }
  .proceeds-amount > span { max-width:53%; line-height:1.8; }
  .proceeds-amount > strong { max-width:44%; }
  .forge-rule > span { max-width:65%; }
  .forge-cost { align-items:baseline; flex-wrap:wrap; gap:6px 20px; }
  .forge-cost > span { min-width:0; }
  .forge-cost strong { text-align:right; }
  .archive-summary { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .archive-summary span { font-size:11px; }
  .archive-summary strong { font-size:13px; }
  .archive-heading { align-items:baseline; gap:20px; }
  .archive-heading > p { font-size:12px; max-width:60%; }
  .demo-reset-row { gap:12px; }
  .demo-reset-row > p { flex-basis:100%; max-width:none; font-size:12px; }
  .reset-link { font-size:12px; }
  .story-index h2 { font-size:33px; }
  html[lang="ja"] .story-index h2 { font-size:29px; }
  html[lang="ko"] .story-index h2 { font-size:31px; }
  .story-seal { font-size:28px; right:0; bottom:5px; }
  .story-index h2 { max-width:75%; }
  .story-copy .story-lead { font-size:15px; }
  .story-copy .story-lead > .i18n-text { display:inline; }
  .faq-layout h2 { font-size:29px; }
  html[lang="ja"] .faq-layout h2 { font-size:26px; }
  .faq-list summary { font-size:13px; }
  .footer-top > p { max-width:100%; line-height:1.9; font-size:12px; }
  .footer-bottom p { font-size:11px; }
  .wallet-help-actions { gap:8px; }
  .wallet-help-actions .btn { min-width:130px; font-size:12px; }
  .modal h2 { font-size:25px; }
  .modal p { line-height:1.95; }
}
@media(max-width:370px) {
  .header-main { gap:8px; }
  .header-main .brand { font-size:21px; gap:7px; }
  .header-main .brand-symbol { width:14px; gap:2px; }
  .header-main .brand-symbol i { width:3px; }
  .wallet-connect { padding:9px 8px; font-size:12px; }
  .wallet-connect .wallet-icon { display:none; }
  #languageSelect { width:84px; padding-left:8px; padding-right:21px; }
  html[lang="en"] .hero-copy h1 { font-size:32px; }
  html[lang="ja"] .hero-copy h1 { font-size:26px; }
  html[lang="ko"] .hero-copy h1 { font-size:30px; }
  .hero-actions { gap:16px 18px; }
  .mode-switch button { font-size:12px; }
  .market-filters { gap:6px; }
  .market-filters button { font-size:11px; padding-left:7px; padding-right:7px; }
  .forge-equation > span { font-size:33px; }
}
