|
584 | 584 | /* ========================================================================== |
585 | 585 | 7. 記事詳細のナビゲーション |
586 | 586 | ========================================================================== */ |
| 587 | +/* Navigation: desktop = equal-width row; mobile = stacked column */ |
587 | 588 | .post-detail__nav--bottom { |
588 | 589 | margin-top: 3rem; |
589 | 590 | margin-bottom: 0; |
590 | | - /* 横並びにして中央寄せ、ボタン間の間隔を確保 */ |
591 | 591 | display: flex; |
592 | 592 | justify-content: center; |
593 | 593 | align-items: center; |
594 | 594 | gap: 0.75rem; |
595 | | - flex-wrap: wrap; |
| 595 | + /* 横幅に余裕があれば折り返さず等幅にする */ |
| 596 | + flex-wrap: nowrap; |
| 597 | + max-width: 900px; |
| 598 | + margin-left: auto; |
| 599 | + margin-right: auto; |
596 | 600 | } |
597 | 601 |
|
598 | | -/* 共通ボタンスタイル(back / prev / next) */ |
| 602 | +/* 共通ボタンスタイル(back / prev / next) - デスクトップは等幅 */ |
599 | 603 | .post-detail__nav--bottom .btn { |
600 | 604 | display: inline-flex; |
601 | 605 | align-items: center; |
602 | 606 | gap: 0.5rem; |
603 | | - padding: 0.5rem 0.9rem; |
| 607 | + padding: 0.6rem 1rem; |
604 | 608 | border-radius: var(--radius-md); |
605 | 609 | background: var(--color-surface); |
606 | | - color: var(--color-text-muted); |
| 610 | + color: var(--color-text); |
607 | 611 | text-decoration: none; |
608 | 612 | font-weight: 600; |
609 | | - font-size: 12px; |
| 613 | + font-size: 13px; |
610 | 614 | transition: var(--transition-smooth); |
611 | 615 | border: 1px solid var(--color-border); |
| 616 | + /* 等幅にするための flex 指定(親が横並び) */ |
| 617 | + flex: 1 1 0; |
| 618 | + min-width: 0; /* overflow 対策 */ |
612 | 619 | /* 長いタイトルは省略表示 */ |
613 | | - max-width: 16rem; |
614 | | - white-space: nowrap; |
615 | 620 | overflow: hidden; |
616 | 621 | text-overflow: ellipsis; |
| 622 | + white-space: nowrap; |
617 | 623 | } |
618 | 624 |
|
| 625 | +/* 中央の戻るボタンはやや目立たせるための余白調整(必要なら上書き) */ |
| 626 | +.btn--back { |
| 627 | + /* デフォルトは他ボタンと同等幅 */ |
| 628 | +} |
619 | 629 | .btn--back:hover { |
620 | 630 | background: var(--color-accent-soft); |
621 | 631 | color: var(--color-text); |
|
645 | 655 | transform: translateX(4px); |
646 | 656 | } |
647 | 657 |
|
| 658 | +/* モバイル: ボタンを縦積み(タップしやすく、順序が明確) */ |
| 659 | +@media (max-width: 600px) { |
| 660 | + .post-detail__nav--bottom { |
| 661 | + flex-direction: column; |
| 662 | + gap: 0.6rem; |
| 663 | + align-items: stretch; |
| 664 | + } |
| 665 | + .post-detail__nav--bottom .btn { |
| 666 | + flex: none; |
| 667 | + width: 100%; |
| 668 | + max-width: none; |
| 669 | + justify-content: center; |
| 670 | + padding: 0.7rem 1rem; |
| 671 | + white-space: normal; |
| 672 | + } |
| 673 | + .btn--prev, |
| 674 | + .btn--next { |
| 675 | + padding-left: 0.75rem; |
| 676 | + padding-right: 0.75rem; |
| 677 | + } |
| 678 | +} |
| 679 | + |
648 | 680 | /* ========================================================================== |
649 | 681 | 8. パンくずリスト |
650 | 682 | ========================================================================== */ |
|
0 commit comments