/* ==========================================================================
   1. VARIABLES & ROOT
   ========================================================================== */

:root,
html[data-theme="light"] {
    --bg-primary: #f7f7f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e5e5ea;
    --bg-tertiary-hover: #dcdce0;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-on-primary-button: #ffffff;
    --border-color: #e5e5ea;
    --primary-accent: #007aff;
    --primary-accent-hover: #005ecb;
    --danger-accent: #ff3b30;
    --danger-accent-hover: #c7001e;
    --success-accent: #34c759;
    --success-accent-hover: #2aa14a;
    --warning-bg: #fffbeb;
    --warning-border: #f59e0b;
    --info-bg: #f0f7ff;
    --error-bg: #fff2f2;
    --header-bg: rgba(28, 28, 30, 0.85);
    --header-text: #ffffff;
    --header-icon: #ffffff;
    --header-icon-hover: #cccccc;
    --modal-shadow: rgba(0, 0, 0, 0.15);
    --flash-shadow: rgba(0, 0, 0, 0.15);
    --bubble-bg: #f0f0f5;
}

html[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --bg-tertiary: #2c2c2e;
    --bg-tertiary-hover: #3a3a3c;
    --text-primary: #f5f5f7;
    --text-secondary: #8e8e93;
    --text-on-primary-button: #ffffff;
    --border-color: #3a3a3c;
    --primary-accent: #0a84ff;
    --primary-accent-hover: #359dff;
    --danger-accent: #ff453a;
    --danger-accent-hover: #ff1c1c;
    --success-accent: #30d158;
    --success-accent-hover: #28a745;
    --warning-bg: #2a2200;
    --warning-border: #ffd60a;
    --info-bg: #002240;
    --error-bg: #400000;
    --header-bg: rgba(0, 0, 0, 0.85);
    --header-text: #f5f5f7;
    --header-icon: #f5f5f7;
    --header-icon-hover: #aaaaaa;
    --modal-shadow: rgba(0, 0, 0, 0.4);
    --flash-shadow: rgba(0, 0, 0, 0.4);
    --bubble-bg: #262628;
}

/* ==========================================================================
   2. GLOBAL RESETS & BASE
   ========================================================================== */

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body,
h1,
h2,
h3,
p,
ul,
li,
textarea,
button,
input {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    border-radius: 0;
    border: none;
    font-family:
        "BIZ UDPGothic",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Hiragino Sans",
        "Yu Gothic UI",
        "Meiryo",
        sans-serif;
    font-size: 1.4rem; /* 基本のフォントサイズ */
    font-weight: 400;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
    padding-bottom: 12rem;
    padding-top: env(safe-area-inset-top, 0rem);    
}

a {
    color: var(--primary-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ==========================================================================
   3. LAYOUT CONTAINERS
   ========================================================================== */

.page-container {
    max-width: 102.4rem;
    margin: 0 auto;
    padding: 0 2rem; /* 2.4remから調整 */
}

.main-container {
    margin-top: 2.4rem; /* 3.2remから調整 */
    margin-bottom: 2.4rem; /* 3.2remから調整 */
    padding: 0 2rem; /* 2.4remから調整 */
}

.content-list-container {
    background-color: var(--bg-secondary);
    border-radius: 2.4rem;
    padding: 2.8rem; /* 3.2remから調整 */
    max-width: 126rem;
    margin: 0 auto;
    min-height: 20rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    background: rgba(0, 0, 0, 0.4);
}

.overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.main-container ul,
.main-container ol {
    padding-left: 2.4rem;
    margin: 1.6rem 0;
}

.main-container ul li,
.main-container ol li {
    padding-left: 0.8rem;
    color: var(--text-primary);
    font-size: 1.4rem;
    line-height: 1.6;
}

.main-container ul li:not(:last-child),
.main-container ol li:not(:last-child) {
    margin-bottom: 1.2rem;
}

.main-container ul li::marker,
.main-container ol li::marker {
    color: var(--text-secondary);
    font-size: 1.3rem;
}

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

.content-title {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 2.4rem;
    line-height: 1.3;
}

.content-title a {
    color: inherit;
    text-decoration: none;
}

.content-title a:hover {
    text-decoration: none;
}

.content-header {
    margin-bottom: 2.4rem;
}

.content-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.6rem;
}

.content-header-title-group {
    flex-grow: 1; 
    flex-shrink: 1;
    min-width: 0;
}

.content-header .content-title {
    margin-bottom: 0.4rem;
}

.participant-count {
    font-size: 1.3rem; /* 1.4remから調整 */
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.content-header-actions {
    display: flex;
    gap: 1.2rem;
    flex-shrink: 0;
}

.thread-snippet-text {
    color: inherit;
    font-weight: normal;
}

/* ==========================================================================
   5. FORMS & BUTTONS
   ========================================================================== */

/* 5a. Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.8rem;
    border: 0.1rem solid transparent;
    border-radius: 999.9rem;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled,
.btn[disabled] {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    border-color: transparent;
}

.btn--primary {
    background-color: var(--primary-accent);
    color: var(--text-on-primary-button);
}

.btn--primary.is-joined {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn--primary.is-joined::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.9rem;
    margin-right: 0.6rem;
}

.btn--secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn--danger {
    background-color: var(--danger-accent);
    color: var(--text-on-primary-button);
}

.btn--warning {
    background-color: var(--warning-border);
    color: #ffffff;
}

html[data-theme="dark"] .btn--warning {
    color: #000000;
}

.btn--pill {
    border-radius: 999.9rem;
}

.btn--large {
    padding: 1.2rem 2.4rem;
    font-size: 1.4rem;
}

.btn--block {
    width: 100%;
}

.btn--icon-text-mobile .fas {
    margin-right: 6px;
}

.btn--with-dot {
    position: relative;
}

.btn--with-dot .new-timeline-dot {
    position: absolute;
    top: 0.5rem;
    right: 0.8rem;
    width: 0.8rem;
    height: 0.8rem;
    background-color: var(--danger-accent);
    border-radius: 50%;
    border: 0.2rem solid var(--danger-accent);
}

.menu-button.btn {
    background: none;
    padding: 0.4rem;
    font-size: 1.6rem;
    color: var(--header-icon);
}

.copy-button {
    margin-left: 0.8rem;
    font-size: 1.1rem;
    vertical-align: middle;
}

.copy-button svg {
    vertical-align: middle;
}

/* 5b. Forms
   -------------------------------------------------------------------------- */

.form-control {
    width: 100%;
    padding: 1.4rem;
    border: 0.1rem solid var(--border-color);
    border-radius: 1.2rem;
    font-size: 1.6rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 0.2rem rgba(0, 122, 255, 0.25);
    background-color: var(--bg-secondary);
}

input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
    border: initial;
    border-radius: initial;
    width: auto;
    height: auto;
    padding: initial;
    line-height: initial;
}

textarea,
input[type="text"],
input[type="password"] {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Hiragino Sans",
        "Yu Gothic UI",
        "Meiryo",
        sans-serif;
    font-size: 1.6rem;
}

.create-timeline-form,
.simple-form {
    background-color: var(--bg-secondary);
    border-radius: 1.6rem;
    padding: 2.4rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label,
.form-group .form-label-heading {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.create-timeline-form .form-group textarea.form-control {
    resize: vertical;
    min-height: 18rem;
    line-height: 1.6;
}

.form-notices {
    margin-top: 2rem;
    padding: 1.6rem;
    background-color: var(--info-bg);
    border-left: 0.4rem solid var(--primary-accent);
    border-radius: 0.8rem;
}

.form-notice {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    font-size: 1.2rem; /* 1.3remから調整 */
    color: var(--text-primary);
    line-height: 1.5;
}

.form-notice:not(:last-child) {
    margin-bottom: 1.2rem;
}

.form-notice .notice-icon {
    font-size: 1.5rem;
    color: var(--primary-accent);
    margin-top: 0.3rem;
    width: 1.6rem;
    text-align: center;
}

.form-notice p {
    flex: 1;
}

.form-notice a {
    font-weight: 700;
    color: var(--primary-accent);
    text-decoration: none;
}

.form-notice a:hover {
    color: var(--primary-accent-hover);
    text-decoration: none;
}

.form-disclaimer {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 1.6rem;
    text-align: center;
    line-height: 1.5;
}

.form-notice-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 1.6rem;
    text-align: left;
    line-height: 1.5;
    padding: 0.8rem 1.2rem;
    background-color: var(--bg-primary);
    border-radius: 0.8rem;
}

.form-disclaimer a {
    color: var(--primary-accent);
    text-decoration: none;
}

.form-disclaimer a:hover {
    color: var(--primary-accent-hover);
    text-decoration: none;
}

/* ==========================================================================
   6. HEADER & NAVIGATION
   ========================================================================== */

/* 6a. Header
   -------------------------------------------------------------------------- */

.header-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 0 2rem calc(2rem + env(safe-area-inset-bottom, 0rem)) 2rem;
    pointer-events: none;
    transform: translateZ(0);
}

.header-container {
    max-width: 102.4rem;
    margin: 0 auto;
    position: relative;
    pointer-events: auto;
}

.header {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem 2rem; /* 1.2rem 2.4remから調整 */
    background-color: var(--header-bg);
    backdrop-filter: blur(1.2rem);
    -webkit-backdrop-filter: blur(1.2rem);
    border-radius: 3.2rem;
    color: var(--header-text);
    overflow: hidden;
    max-height: 6rem;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-radius 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 -0.1rem 0.4rem rgba(0, 0, 0, 0.1);
}

.header-container.is-open .header {
    max-height: 75vh;
    border-radius: 3.2rem;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
    height: 3.6rem;
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.header-logo {
    font-family: 'Monoton', sans-serif;
    font-size: 2.6rem;
    font-weight: 400;
}

.header-logo a {
    color: inherit;
    text-decoration: none;
}

.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
}

.center-post-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 1.9rem;
    transition: background-color 0.2s;
    cursor: pointer;
    box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.1);
}

.header-icon {
    font-size: 2rem;
    color: var(--header-icon);
    transition: color 0.2s;
    text-decoration: none;
}

.header-icon:hover {
    text-decoration: none;
}

/* 6b. Expandable Menu
   -------------------------------------------------------------------------- */

.expandable-menu-inner {
    /*padding: calc(2.4rem + env(safe-area-inset-top, 0rem)) 
             2.4rem 
             1.6rem 
             2.4rem;*/
    padding: 2.4rem
             2.4rem 
             1.6rem 
             2.4rem;
    flex-grow: 1;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.2s ease-out 0.1s;
}

.header-container.is-open .expandable-menu-inner {
    opacity: 1;
}

.expandable-menu-inner .sidebar-header {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--header-text);
}

.sidebar-header-container {
    margin-bottom: 1.6rem;
}

.sidebar-filter-menu {
    display: flex;
    gap: 1rem;
}

.sidebar-filter-link {
    padding: 0.6rem 1.4rem;
    border-radius: 999.9rem;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--header-icon-hover);
    transition: all 0.2s;
}

.sidebar-filter-link.is-active {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
}

.sidebar-filter-link.is-active:hover,
.sidebar-filter-link.is-active:active {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
}

.sidebar-filter-link:hover,
.sidebar-filter-link:active {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--header-icon);
    text-decoration: none;
}

ul.timeline-list {
    list-style: none;
}

.timeline-list a {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.6rem;
    color: var(--header-text);
    border-radius: 0.8rem;
    transition: background-color 0.2s;
    position: relative;
    text-decoration: none;
}

.create-timeline-menu-link {
    color: var(--header-icon-hover) !important;
}

.create-timeline-menu-link .fa-plus-circle {
    width: 2rem;
    text-align: center;
    margin-right: 0.8rem;
}

.timeline-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.notification-dot-list {
    width: 0.8rem;
    height: 0.8rem;
    background-color: var(--danger-accent);
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: auto;
}

.menu-divider {
    height: 0.1rem;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 1.6rem 0;
}

.timeline-list-empty-state {
    text-align: center;
    padding: 3.2rem 1.6rem;
    color: #a0a0a0;
}

.timeline-list-empty-state .empty-state-icon {
    font-size: 4.8rem;
    margin-bottom: 2.4rem;
    opacity: 0.8;
}

.timeline-list-empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #a0a0a0;
    margin-bottom: 0.8rem;
}

.timeline-list-empty-state p {
    font-size: 1.4rem;
    max-width: 28rem;
    margin: 0 auto 2.4rem;
    line-height: 1.5;
}

.menu-overlay {
    z-index: 99;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(0.4rem);
    -webkit-backdrop-filter: blur(0.4rem);
}

/* 6c. Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumb-title {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    overflow: hidden; /* 親コンテナからはみ出さない */
    width: 100%;
}

.breadcrumb-logo,
.breadcrumb-separator,
.breadcrumb-title .content-title {
    flex-shrink: 0; /* [重要] ロゴ、区切り線、"スレッド" は縮まない */
}

.breadcrumb-logo {
    font-family: 'Monoton', sans-serif;
    font-weight: 400;
    font-size: 2.4rem;
    color: #999;
}
.breadcrumb-logo a {
    color: inherit;
    text-decoration: none;
}
.breadcrumb-logo a:hover {
    text-decoration: none;
}

.breadcrumb-separator {
    font-size: 1.6rem;
    color: #ccc;
    line-height: 1;
}

/* h2 タグ共通スタイル */
.breadcrumb-title .content-title,
.breadcrumb-title .content-title-parent {
    margin-bottom: 0 !important;
    font-size: 2rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* [修正] 親階層（タイムライン名） */
.breadcrumb-title .content-title-parent {
    font-weight: 400;
    color: var(--text-secondary);
    
    /* [重要] この要素を唯一の伸縮要素にする */
    flex-grow: 0;
    flex-shrink: 1;
    min-width: 0;  /* 縮むために必須 */
}
.breadcrumb-title .content-title-parent a {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block; /* aタグがh2の幅全体に広がるようにする */
}
.breadcrumb-title .content-title-parent a:hover {
    color: var(--primary-accent);
    text-decoration: none;
}

.breadcrumb-title .content-title {
    flex-shrink: 1;
    flex-grow: 0;
    min-width: 0;
}

.breadcrumb-title .content-title a {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
/* ==========================================================================
   7. COMPONENTS
   ========================================================================== */

/* 7a. Modals
   -------------------------------------------------------------------------- */

.modal-overlay {
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.6rem;
    backdrop-filter: blur(0.8rem);
    -webkit-backdrop-filter: blur(0.8rem);
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: calc(2.8rem + env(safe-area-inset-top, 0rem)) 
             2.8rem 
             calc(2.8rem + env(safe-area-inset-bottom, 0rem)) 
             2.8rem;
    border-radius: 2.4rem;
    width: 100%;
    max-width: 50rem;
    box-shadow: 0 0.4rem 2rem var(--modal-shadow);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    transform: scale(0.95) translateY(-1rem);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease-out;
}

#content-modal-overlay .modal-content {
    max-width: 80rem;
}

.modal-overlay.is-open .modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal-close-button {
    position: absolute;
    top: 1.6rem;
    right: 1.6rem;
    background: transparent;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 0.8rem;
    cursor: pointer;
    font-size: 2.6rem;
    color: var(--text-primary);
    opacity: 1;
    line-height: 3.6rem;
    text-align: center;
    padding: 0;
    transition: opacity 0.2s;
    border: none;
}

.form-modal h2,
.view-modal-content h2,
.info-modal-content h2 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 2.4rem;
    text-align: center;
}

.form-modal textarea.form-control {
    resize: vertical;
    margin-bottom: 1.6rem;
}

.modal-actions {
    margin-top: 1.6rem;
    display: flex;
    gap: 1.2rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-actions:has(> :only-child) {
    justify-content: center;
}

.modal-actions .btn {
    flex-grow: 1;
    min-width: 10rem;
}

.original-post-quote {
    background-color: var(--bg-primary);
    border-left: 0.3rem solid var(--border-color);
    padding: 1.2rem 1.6rem;
    margin-bottom: 1.6rem;
    border-radius: 0 0.8rem 0.8rem 0;
}

.original-post-quote .quoted-author {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.original-post-quote .quoted-content {
    font-size: 1.4rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-height: 6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.info-modal-content p,
.view-modal-content p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.info-modal-content ul {
    font-size: 1.2rem; /* 1.3remから調整 */
    padding-left: 2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.info-modal-content li {
    padding-left: 0.8rem;
    margin-bottom: 1rem;
}

.info-modal-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

#view-modal-body {
    background-color: var(--bg-primary);
    padding: 1.6rem;
    border-radius: 0.8rem;
    margin-bottom: 1.6rem;
}

#view-modal-body .item-card {
    background-color: transparent;
    margin-bottom: 0;
    border-bottom: none;
}
#view-modal-body .item-card .item-card-content-swiper {
    background-color: transparent;
}

#content-modal-body {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-primary);
}

#content-modal-body a {
    color: var(--primary-accent);
    text-decoration: underline;
}

#content-modal-body a:hover {
    color: var(--primary-accent-hover);
}

#content-modal-body h1,
#content-modal-body h2,
#content-modal-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}

#content-modal-body h1 {
    font-size: 1.9rem;
}

#content-modal-body h2 {
    font-size: 1.7rem;
}

#content-modal-body h3 {
    font-size: 1.5rem;
}

#content-modal-body ul,
#content-modal-body ol {
    margin: 1em 0;
    padding-left: 2em;
}

#content-modal-body li {
    margin-bottom: 0.5em;
}

/* 7b. Flash Messages
   -------------------------------------------------------------------------- */

.flash-message-container {
    position: fixed;
    top: calc(2.4rem + env(safe-area-inset-top, 0rem));
    left: 50%;
    transform: translate(-50%, -2rem);
    z-index: 2000;
    padding: 1.2rem 2.4rem;
    background-color: var(--header-bg);
    color: var(--header-text);
    border-radius: 999.9rem;
    box-shadow: 0 0.4rem 2rem var(--flash-shadow);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    font-size: 1.3rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.2, 1, 0.4, 1);
}

.flash-message-container.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

/* 7c. Info Boxes
   -------------------------------------------------------------------------- */

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 1.4rem 4rem 1.4rem 1.4rem; /* 1.6remから調整 */
    border-radius: 1.2rem;
    margin-bottom: 2.4rem;
    position: relative;
}

.js-dismissible-notice {
    display: none;
}

.info-box-close-btn {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.8rem;
    background-color: transparent;
    border: none;
    color: var(--text-primary);
    opacity: 1;
    font-size: 2.4rem;
    line-height: 3.2rem;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
    padding: 0;
}

html[data-theme="dark"] .info-box-close-btn {
    background-color: transparent;
}

.info-box.is-dismissed {
    transition: opacity 0.3s ease-out, max-height 0.3s ease-out, margin 0.3s ease-out, padding 0.3s ease-out, border 0.3s ease-out;
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: hidden;
    border-width: 0;
}

.info-box .info-icon {
    font-size: 1.8rem;
    margin-top: 0.3rem;
    width: 2rem;
    text-align: center;
}

.info-box .info-content {
    flex: 1;
}

.info-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.info-box p {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.info-box .btn {
    margin-top: 1.2rem;
}

.info-box--yellow {
    background-color: var(--warning-bg);
    border-left: 0.4rem solid var(--warning-border);
}

.info-box--yellow .info-icon {
    color: var(--warning-border);
}

.info-box--red {
    background-color: var(--error-bg);
    border-left: 0.4rem solid var(--danger-accent);
}

.info-box--red .info-icon {
    color: var(--danger-accent);
}

.info-box--red h3 {
    color: var(--danger-accent);
}

.info-box--blue {
    background-color: var(--info-bg);
    border-left: 0.4rem solid var(--primary-accent);
}

.info-box--blue .info-icon {
    color: var(--primary-accent);
}

#post-id-notice {
    margin-bottom: 1.6rem;
    padding: 1.2rem 4rem 1.2rem 1.2rem;
    text-align: left;
}

#post-id-notice .info-content p {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0;
}

#post-id-notice .info-icon {
    font-size: 1.6rem;
    margin-top: 0.2rem;
    margin-left: 0.4rem;
}

#post-id-notice .info-box-close-btn {
    top: 0.6rem;
    right: 0.6rem;
    width: 2.6rem;
    height: 2.6rem;
    line-height: 2.6rem;
}

#interaction-guide-infobox .info-content p {
    position: relative;
    padding-left: 24px;
    line-height: 1.6;
    margin-bottom: 1.2rem !important;
}

#interaction-guide-infobox .info-content p:last-child {
    margin-bottom: 0 !important;
}

#interaction-guide-infobox .info-content p i {
    position: absolute;
    left: 0;
    top: 0.2em;
    margin-right: 0 !important;
    width: 16px !important;
    text-align: center !important;
}

/* 7d. Pagination
   -------------------------------------------------------------------------- */

.pagination-wrapper {
    text-align: center;
    margin-top: 4rem;
}

.pagination {
    display: inline-flex;
    align-items: center;
    border-radius: 999.9rem;
    background-color: var(--bg-tertiary);
    padding: 0.6rem;
}

.pagination a,
.pagination span {
    padding: 0.8rem 1.6rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 999.9rem;
    min-width: 8rem;
    text-align: center;
    transition: background-color 0.2s;
}

.pagination span.disabled {
    color: var(--text-secondary);
    opacity: 0.6;
    pointer-events: none;
    cursor: default;
}

.pagination span.current-page {
    font-weight: 700;
    color: var(--text-primary);
}

/* 7e. Loaders & Indicators
   -------------------------------------------------------------------------- */

.notification-icon-wrapper {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: -0.4rem;
    right: -0.6rem;
    min-width: 1.7rem;
    height: 1.7rem;
    background-color: var(--danger-accent);
    border-radius: 0.85rem;
    border: 0.2rem solid var(--header-bg);
    color: white;
    font-size: 1.0rem;
    line-height: 1.3rem;
    text-align: center;
    padding: 0 0.3rem;
    box-sizing: border-box;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease-out;
    pointer-events: none;
}

.notification-dot.is-visible {
    transform: scale(1);
    opacity: 1;
}

.new-posts-indicator {
    position: fixed;
    top: calc(1rem + env(safe-area-inset-top, 0rem));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    background-color: var(--primary-accent);
    border-radius: 999.9rem;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.new-posts-indicator button {
    background: none;
    border: none;
    color: var(--text-on-primary-button);
    padding: 0.8rem 1.6rem;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: block;
    width: 100%;
}

.like-count-plus {
    position: absolute;
    font-size: 1.2rem;
    color: var(--danger-accent);
    pointer-events: none;
    transform: translateX(-50%);
    opacity: 1;
}

.like-count-plus.is-fading {
    animation: floatUpAndFadeOut 0.8s ease-out forwards;
}

/* 7f. Ad Placeholders
   -------------------------------------------------------------------------- */

.ad-placeholder {
    background-color: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: 1.2rem;
    padding: 2.4rem 1.6rem;
    text-align: center;
    color: var(--text-secondary);
    margin: 2.4rem 0;
}

.ad-placeholder .fas {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    display: block;
    opacity: 0.8;
}

.ad-placeholder p {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: 0 0 0.4rem 0;
}

.ad-placeholder span {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* 7g. Theme Switcher
   -------------------------------------------------------------------------- */

.theme-switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    font-size: 1.4rem;
    color: var(--header-text);
}

.switch {
    position: relative;
    display: inline-block;
    width: 5rem;
    height: 2.8rem;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.4s;
    border-radius: 3.4rem;
}

.slider:before {
    position: absolute;
    content: "";
    height: 2.2rem;
    width: 2.2rem;
    left: 0.3rem;
    bottom: 0.3rem;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-accent);
}

input:checked + .slider:before {
    transform: translateX(2.2rem);
}

/* ==========================================================================
   8. PAGE-SPECIFIC: HERO & ERRORS
   ========================================================================== */

/* 8a. Hero Section
   -------------------------------------------------------------------------- */

.hero-section {
    padding: 6rem 2.4rem; /* 8rem 3.2remから調整 */
    text-align: center;
    margin-bottom: 2.4rem;
    margin-top: 4.8rem;
}

.hero-logo {
    font-family: 'Monoton', sans-serif;
    font-size: 8rem;
    font-weight: 400;
    margin-bottom: 1.6rem;
    color: var(--text-primary);
}

.hero-tagline {
    font-size: 2.6rem;
    font-weight: 600;
    max-width: 60rem;
    margin: 0 auto 2.4rem auto;
    line-height: 1.3;
}

.tagline-y {
    color: var(--text-primary);
}

.tagline-rest {
    color: var(--text-secondary);
}

.hero-description {
    font-size: 1.4rem;
    max-width: 50rem;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 700;
}

.hero-cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    margin-top: 3.2rem;
}

.restore-account-link {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.restore-account-link:hover {
    color: var(--text-primary);
    text-decoration: none;
}

/* 8b. Error Page
   -------------------------------------------------------------------------- */

.error-page-container {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page-container .error-icon {
    font-size: 4.8rem;
    color: var(--danger-accent);
    margin-bottom: 2.4rem;
}

.error-page-container h2 {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.error-page-container p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 2.4rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ==========================================================================
   9. PAGE-SPECIFIC: TIMELINE & POSTS
   ========================================================================== */

/* 9a. Timeline List / Showcase
   -------------------------------------------------------------------------- */

.timeline-description {
    display: none;
    font-size: 1.4rem;
    color: var(--text-primary);
    line-height: 1.7;
    padding: 1.6rem;
    background-color: var(--bubble-bg);
    border-radius: 0 1.6rem 1.6rem 1.6rem;
    margin-top: 2rem;
}

.timeline-description h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}
.timeline-description-actions {
    margin-top: 2rem;
    border-top: 0.1rem solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    gap: 1rem;
}

.timeline-description-actions .btn i {
    margin-right: 6px;
}

.timeline-description .btn {
    background-color: var(--bg-secondary);
}

.timeline-description .btn:hover {
    background-color: var(--bg-tertiary);
}

.timeline-description .btn:active {
    background-color: var(--bg-tertiary-hover);
}

.timeline-description a {
    color: var(--primary-accent);
}

.timeline-description a:hover {
    text-decoration: none;
}

.timeline-description p {
    margin-bottom: 1em;
}

.timeline-description ul,
.timeline-description ol {
    margin: 1em 0;
    padding-left: 2.4rem;
    list-style-position: outside;
}

.timeline-description ul {
    list-style-type: disc;
}

.timeline-description ol {
    list-style-type: decimal;
}

.timeline-description li {
    font-size: inherit;
    line-height: inherit;
    margin-bottom: 0.5em;
    padding-left: 0.4rem;
}

.timeline-description > :last-child {
    margin-bottom: 0;
}

.timeline-showcase-section {
    margin-bottom: 3.2rem;
}

.showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.6rem;
}

.timeline-showcase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.6rem;
    padding: 1.4rem 0.8rem; /* 1.6remから調整 */
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: background-color 0.2s ease-in-out, border-radius 0.2s ease-in-out;
    border-radius: 0;
    margin: 0 -0.8rem;
}

.timeline-showcase-item.is-muted {
    display: none !important;
}

.timeline-showcase-item .item-info {
    flex: 1;
    min-width: 0;
}

.timeline-showcase-item h3 {
    font-size: 1.6rem; /* 1.5remから調整 */
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.timeline-showcase-item h3 .timeline-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline;
}

.unread-dot-placeholder {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 0.8rem;
    order: -1;
}

.unread-dot-placeholder::before {
    content: '';
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    background-color: #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.3s;
}

.timeline-showcase-item[data-is-mine="true"] .unread-dot-placeholder::before,
.hot-thread-item[data-is-mine="true"] .unread-dot-placeholder::before {
    background-color: var(--primary-accent);
}

.timeline-showcase-item.has-unread .unread-dot-placeholder::before,
.hot-thread-item.has-unread .unread-dot-placeholder::before {
    background-color: var(--danger-accent);
}

.timeline-showcase-item .item-description {
    font-size: 1.2rem; /* 1.3remから調整 */
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 1.6rem;
    line-height: 1.5;
}

.timeline-showcase-item .item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 1.2rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    gap: 0.4rem;
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.timeline-search-container {
    position: relative;
    margin-bottom: 1.6rem;
}

.timeline-search-container .search-icon {
    position: absolute;
    top: 50%;
    left: 1.6rem;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1.5rem;
}

.timeline-search-container .form-control {
    padding-left: 4.4rem;
    border-radius: 999.9rem;
}

.timeline-search-container .form-control:focus {
    background-color: var(--bg-secondary);
    border-color: var(--primary-accent);
}

.timeline-search-container.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1.6rem;
    width: 1.8rem;
    height: 1.8rem;
    margin-top: -0.9rem;
    border: 0.2rem solid transparent;
    border-top-color: var(--primary-accent);
    border-right-color: var(--primary-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.timeline-filter-menu {
    display: flex;
    flex-wrap: nowrap; /* 常に横一列 */
    align-items: center; /* 中央揃え */
    gap: 1rem; /* リンク間の隙間 */
    margin-bottom: 2rem;
    
    /* 横スクロール対応 */
    overflow-x: auto;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
    
    /* スクロールバー非表示 (webkit) & スクロールエリア確保 */
    padding-bottom: 4px; 
    margin-bottom: 1.6rem; /* 2.0rem - 0.4rem */
}
.timeline-filter-menu::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* [NEW] 区切り線のスタイル */
.filter-menu-divider {
    width: 1px;
    height: 1.6rem;
    background-color: var(--border-color);
    flex-shrink: 0;
    margin: 0 0.2rem;
}

.filter-link {
    padding: 0.8rem 1.6rem;
    border-radius: 999.9rem;
    font-size: 1.3rem;
    text-decoration: none;
    transition: all 0.2s;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0; /* ボタンが縮まないようにする */
}

.filter-link:hover {
    text-decoration: none;
}

.filter-link.is-active {
    background-color: var(--primary-accent);
    color: var(--text-on-primary-button);
}

/* 9a-2. Hot Thread List Item */
.hot-thread-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.6rem;
    padding: 1.4rem 0.8rem;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: background-color 0.2s ease-in-out, border-radius 0.2s ease-in-out;
    border-radius: 0;
    margin: 0 -0.8rem;
}

.hot-thread-item:hover {
    background-color: var(--bg-tertiary);
    border-radius: 1.2rem;
    text-decoration: none;
}

.hot-thread-item .item-info {
    flex: 1;
    min-width: 0;
}

.hot-thread-item h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    line-height: 1.4;
    display: flex; /* ドットと並べる */
    align-items: center; /* 中央揃え */
}

.hot-thread-item h3 .hot-thread-content {
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block; /* 伸縮のためにブロック要素にする */
    min-width: 0;
}

.hot-thread-item .item-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    padding-left: 1.6rem;
}
.hot-thread-item .item-description .fa-list-alt {
    margin-right: 0.4rem;
}

.hot-thread-item .item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 1.2rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    gap: 0.4rem;
}

.hot-thread-item .item-meta span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.hot-thread-item.is-muted {
    display: none !important;
}

/* 9b. Post Item Card
   -------------------------------------------------------------------------- */

.post-trigger-form {
    background-color: var(--bg-primary);
    border: 0.1rem solid var(--border-color);
    border-radius: 999.9rem;
    padding: 1.4rem 2rem;
    margin-bottom: 2rem; /* 2.4remから調整 */
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    color: var(--text-secondary);
    transition: background-color 0.2s, border-color 0.2s;
}

.item-feed .item-card {
    position: relative;
    z-index: 0;
    overflow: hidden;
    background-color: var(--bg-secondary);
    opacity: 0;
}

.item-card.is-read-visible {
    opacity: 1;
}

.item-card.item-card--unread-highlight {
    animation: fadeInPost 0.6s ease-out 0.2s forwards;
}

.item-card:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.item-card.is-muted,
.thread-item-wrapper.is-muted,
.item-card.is-hidden,
.thread-item-wrapper.is-hidden {
    display: none !important;
}

.item-card.is-deleting,
.thread-item-wrapper.is-deleting {
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, max-height 0.4s ease-out, margin 0.4s ease-out, padding 0.4s ease-out;
    opacity: 0;
    transform: translateX(-2rem);
    max-height: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: none !important;
    overflow: hidden;
    visibility: hidden;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.item-timeline-name {
    font-size: 1.1rem;
    color: var(--text-secondary);
    padding: 0.2rem 0.8rem;
    background-color: var(--bg-tertiary);
    border-radius: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.item-timeline-name a {
    color: inherit;
    text-decoration: none;
}

.item-timeline-name a:hover {
    text-decoration: none;
}

.item-timeline-name .fa-list-alt {
    margin-right: 0.4rem;
    font-size: 1rem;
}

.item-author {
    font-weight: 600;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.item-author.daily-id-blockable {
    cursor: pointer;
}

.item-author.daily-id-blockable:hover {
    text-decoration: none;
}

.item-author::before {
    content: '';
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    background-color: #ccc;
    border-radius: 50%;
    margin-right: 0.8rem;
    vertical-align: middle;
    position: relative;
    top: -0.1rem;
}

.item-card.is-reply-post .item-author::before {
    content: "\f3e5";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ccc;
    font-size: 1.2rem;
    width: auto;
    height: auto;
    background-color: transparent;
    margin-right: 0.8rem;
    top: 0;
}

.item-card.is-reply-post .item-author.item-author--mine::before {
    color: var(--primary-accent);
}

.item-card.is-reply-post .item-author.item-author--unread::before {
    color: var(--danger-accent);
}

.thread-item-wrapper .item-author::before {
    left: 0;
}

.item-author.item-author--mine::before {
    background-color: var(--primary-accent);
}

.item-author.item-author--unread::before {
    background-color: var(--danger-accent);
}

.item-timestamp {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.item-timestamp a {
    color: var(--text-secondary);
    text-decoration: none;
}

.item-timestamp a:hover {
    text-decoration: none;
}

/* 9c. Post Content
   -------------------------------------------------------------------------- */

.item-main {
    padding-left: 1.4rem; /* 1.6remから調整 */
}

.item-content {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--text-primary);
    max-width: 70ch;
    display: inline-block;
    position: relative;
    background-color: var(--bubble-bg);
    border-radius: 0 1.6rem 1.6rem 1.6rem;
    padding: 1.1rem 1.5rem; /* 1.2rem 1.6remから調整 */
    text-align: left;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: background-color 0.3s ease-out, transform 0.1s ease-out;
}

.post-text-content {
    white-space: pre-wrap;
    word-break: break-word;
    display: block;
}

html[data-theme="dark"] .item-content {
    background-color: var(--bubble-bg);
}

.item-content.is-truncated {
    overflow: hidden;
    position: relative;
}

.item-content.is-truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5.8rem;
    background: linear-gradient(to top, var(--bubble-bg) 50%, transparent 90%);
    pointer-events: none;
    border-radius: 0 0 1.6rem 1.6rem;
    z-index: 1;
}

html[data-theme="dark"] .item-content.is-truncated::after {
    background: linear-gradient(to top, #262628 40%, transparent);
}

.item-content.is-truncated .read-more-button {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.item-content.is-truncated {
    padding-bottom: 3rem;
}

html[data-theme="light"] .item-content.is-pressing {
    background-color: #e8e8ed;
    transform: none;
    transition: background-color 0.1s ease-out;
}

html[data-theme="dark"] .item-content.is-pressing {
    background-color: #303032;
    transform: none;
    transition: background-color 0.1s ease-out;
}

.item-content.is-like-bouncing {
    animation-name: like-bubble-flash;
    animation-duration: 0.5s;
    animation-timing-function: ease-out;
    transform: none;
}

.read-more-button {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    background-color: transparent;
    padding: 0;
    z-index: 2;
    cursor: pointer;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, color 0.3s ease;
    pointer-events: none;
}

.read-more-button i {
    color: var(--primary-accent);
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.read-more-button:hover {
    text-decoration: none;
}

.post-notice-block {
    display: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    padding: 0.4rem 0;
}

.post-notice-block p {
    margin-bottom: 0.8rem;
}

/* 9d. Post Actions & Swipe
   -------------------------------------------------------------------------- */

.item-actions {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    position: relative;
    margin-left: 1.2rem;
    justify-content: flex-start;
}

.item-actions .reply-button,
.item-actions .like-form {
    display: none;
}

.item-card[data-is-mine="true"] .item-actions {
    margin-top: 0.4rem;
}

.item-card[data-is-mine="true"] .item-actions .reply-button,
.item-card[data-is-mine="true"] .item-actions .like-form {
    display: inline-flex;
    align-items: center;
}

.item-card[data-is-mine="true"] .item-actions .reply-button {
    opacity: 0.5;
}

.item-actions form {
    margin: 0;
    padding: 0;
    display: inline;
}

.item-actions button {
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.2rem; /* 1.3remから調整 */
    padding: 0.4rem;
    display: flex;
    align-items: center;
    position: relative;
}

.item-actions .fa-heart,
.item-actions .fa-comment {
    margin-right: 0.8rem;
    font-size: 1.5rem;
    vertical-align: middle;
}

.item-card[data-is-mine="true"] .like-button {
    pointer-events: none;
    opacity: 0.5;
    color: var(--text-secondary);
}

.item-card[data-is-mine="true"] .like-button span {
    display: inline;
}

.action-button {
    position: relative;
    top: auto;
    right: auto;
    background: none;
    cursor: pointer;
    font-size: 2rem;
    color: #ffffff;
    padding: 0.4rem;
    line-height: 1;
    opacity: 1;
    transition: opacity 0.2s, color 0.2s;
    width: 80px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-button:hover {
    opacity: 1;
    color: var(--text-primary);
}

.item-card-content-swiper {
    position: relative;
    z-index: 2;
    padding: 1.4rem 0; /* 1.6remから調整 */
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.4, 1),
        background-color 0.3s ease-out,
        border-radius 0.2s ease-out;
    background-color: var(--bg-secondary);
    border-radius: 0;
    overflow: hidden;
}

.item-card-content-swiper.is-swiping,
.item-card.item-card--unread-highlight .item-card-content-swiper,
.item-card.is-viewed .item-card-content-swiper {
    border-radius: 1.2rem;
}

.item-card-content-swiper.is-swiping {
    transition: none !important;
}

.item-card.is-consecutive-post .item-header {
  display: none;
}
.item-card.is-consecutive-post .item-card-content-swiper {
  padding-top: 0.4rem;
}

.item-card-actions-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
}

.item-card-actions-bg.is-delete {
    background-color: var(--danger-accent);
}

.item-card-actions-bg.is-delete .action-button:hover {
    color: #ffcccc;
}

.item-card-actions-bg.is-hide {
    background-color: var(--text-secondary);
}

.item-card-actions-bg.is-hide .action-button:hover {
    color: #dddddd;
}

.item-card.item-card--unread-highlight:not(.is-swiping) .item-card-actions-bg,
.item-card.is-viewed:not(.is-swiping) .item-card-actions-bg {
    display: none;
}

/* 9e. Threads
   -------------------------------------------------------------------------- */

.reply-to-block {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-accent);
    cursor: pointer;
    display: inline-block;
}

.reply-to-block:hover {
    color: var(--primary-accent-hover);
    text-decoration: none;
}

.reply-to-block .fa-reply {
    margin-right: 0.4rem;
}

.thread-owner-badge {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--primary-accent);
    background-color: transparent;
    border: 1px solid var(--primary-accent);
    padding: 0.1rem 0.6rem;
    border-radius: 0.8rem;
    line-height: 1.3;
    white-space: nowrap;
    margin-left: -0.4rem;
}

html[data-theme="dark"] .thread-owner-badge {
    color: var(--primary-accent);
    border-color: var(--primary-accent);
}

.thread-item-wrapper {
    position: relative;
    margin-top: 1.2rem; /* 1.6remから調整 */
}

.thread-item-wrapper .thread-item-wrapper {
    padding-left: 3.2rem;
}

.thread-item-wrapper .item-card {
    padding-top: 0;
}

.thread-item-wrapper.is-muted::before,
.thread-item-wrapper.is-muted::after,
.thread-item-wrapper.is-hidden::before,
.thread-item-wrapper.is-hidden::after {
    display: none;
}

.thread-item-wrapper .item-card.is-highlighted {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.thread-item-wrapper .item-card.is-highlighted .item-content {
    /* 背景色は通常と同じにする */
    background-color: var(--bubble-bg); 
}

.thread-item-wrapper .item-card.is-highlighted .post-text-content {
    /* テキストを太字にする */
    font-weight: 700; 
}

/* 9f. Date Divider
   -------------------------------------------------------------------------- */

.date-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin: 2.4rem 0;
    position: relative;
    overflow: hidden;
}

.date-divider.is-hidden {
    display: none !important;
}

.date-divider::before {
    content: '';
    width: 100%;
    position: absolute;
    left: 0;
    top: 50%;
    height: 0.1rem;
    background-color: var(--border-color);
    z-index: 0;
}

.date-divider span {
    padding: 0 1.6rem;
    background-color: var(--bg-secondary);
    z-index: 1;
    margin: 0 auto;
}

/* ==========================================================================
   10. PAGE-SPECIFIC: NOTIFICATIONS
   ========================================================================== */

.notification-section .content-title {
    margin-bottom: 1rem;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    padding: 1.4rem 1.2rem; /* 1.6remから調整 */
    border-radius: 1.2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: var(--bg-tertiary);
    text-decoration: none;
}

.notification-item.unread {
    background-color: rgba(0, 122, 255, 0.1);
}

.notification-item.unread:hover {
    background-color: rgba(0, 122, 255, 0.15);
}

.notification-item.is-viewed {
    animation: fadeOutBackground 2s ease-out 1s forwards;
}

.notification-icon {
    font-size: 1.8rem;
    width: 2.4rem;
    text-align: center;
    color: var(--text-secondary);
}

.notification-icon.like {
    color: var(--danger-accent);
}

.notification-icon.reply {
    color: var(--primary-accent);
}

.notification-icon.follow {
    color: #34c759;
}

.notification-content {
    flex: 1;
}

.notification-text {
    font-size: 1.4rem;
    line-height: 1.5;
}

.notification-text strong {
    font-weight: 700;
}

.notification-timestamp {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* ==========================================================================
   11. PAGE-SPECIFIC: SETTINGS & MYPAGE
   ========================================================================== */

.mypage-container .content-header-top {
    flex-wrap: nowrap;
}

.mypage-container .timeline-filter-menu {
    margin-top: 2.4rem;
}

.settings-section .setting-item {
    margin-bottom: 2.4rem;
    padding: 1.8rem; /* 2remから調整 */
    border: 0.1rem solid var(--border-color);
    border-radius: 1.2rem;
    background-color: var(--bg-secondary);
}

.settings-section .setting-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.settings-section .setting-item p {
    font-size: 1.2rem; /* 1.3remから調整 */
    color: var(--text-secondary);
    margin-bottom: 1.6rem;
    line-height: 1.5;
}

.settings-section .user-token-display {
    font-family: monospace;
    background-color: var(--bg-tertiary);
    padding: 1rem 1.2rem;
    border-radius: 0.8rem;
    word-break: break-all;
    font-size: 1.2rem;
    color: var(--text-primary);
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
    border: 0.1rem solid var(--border-color);
}

.mute-word-list {
    list-style: none;
    margin: 1.6rem 0;
    padding: 0 !important;
}

.mute-word-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.6rem;
    border: 0.1rem solid var(--border-color);
    border-radius: 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    background-color: var(--bg-primary);
}

.mute-word-list li span {
    word-break: break-all;
    padding-right: 1.6rem;
}

.mute-word-list .remove-mute-word-btn {
    background: none;
    border: none;
    color: var(--danger-accent);
    cursor: pointer;
    padding: 0.4rem;
    font-size: 1.8rem;
    line-height: 1;
}

.setting-item--danger {
    border-color: var(--danger-accent);
    background-color: var(--error-bg);
}
.setting-item--danger h3 {
    color: var(--danger-accent);
}
.setting-item--danger p {
    color: var(--text-primary);
    font-size: 1.3rem;
}
.setting-item--danger p strong {
    font-weight: 700;
    color: var(--danger-accent);
}
.setting-item--danger .btn--danger {
    font-size: 1.3rem;
}
.setting-item--danger .btn--danger i {
    margin-right: 6px;
}

/* ==========================================================================
   11b. OFFICIAL BADGES
   ========================================================================== */

.official-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-accent);
    margin-left: 0.8rem;
    line-height: 1;
    gap: 0.4rem;
    flex-shrink: 0;
}

.official-badge--with-text {
    font-weight: 600;
    font-size: 1.4rem;
}
.official-badge--with-text i {
    font-size: 1.6rem;
}

.timeline-showcase-item h3 .official-badge {
    font-size: 1.4rem;
    margin-left: 0.6rem;
    order: 2;
    gap: 0;
}

.breadcrumb-title .content-title .official-badge {
     margin-left: 0.6rem;
}


/* ==========================================================================
   12. FOOTER
   ========================================================================== */

.footer {
    text-align: center;
    padding: 4rem 1.6rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.footer-links {
    margin-bottom: 1.2rem;
}

.footer-links a {
    color: var(--text-secondary);
    margin: 0 1rem;
    text-decoration: none;
    font-size: 1.1rem;
}

.footer-links a:hover {
    text-decoration: none;
}

.copyright {
    font-size: 1.0rem;
}

/* ==========================================================================
   13. ANIMATIONS & KEYFRAMES
   ========================================================================== */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes like-bubble-flash {
    0% {
        background-color: rgba(0, 122, 255, 0.2);
    }
    100% {
        background-color: var(--bubble-bg);
    }
}

@keyframes like-push {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.like-button.is-animating {
    animation: like-push 0.3s ease-out;
}

@keyframes floatAndSway {
    0% {
        transform: translate(-50%, -50%) scale(0.6) rotate(var(--r-start));
        opacity: 1;
    }
    50% {
        transform: translate(calc(-50% + var(--tx)), -5rem) scale(1.2) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--tx-end)), -10rem) scale(0.8) rotate(var(--r-end));
        opacity: 0;
    }
}

.floating-heart {
    position: fixed;
    color: var(--danger-accent);
    font-size: 1.1rem;
    pointer-events: none;
    animation-name: floatAndSway;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
    z-index: 9999;
}

@keyframes fadeInPost {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOutBackground {
    from {
        background-color: rgba(0, 122, 255, 0.1);
    }
    to {
        background-color: var(--bg-secondary);
    }
}

@keyframes floatUpAndFadeOut {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -2rem);
        opacity: 0;
    }
}

@keyframes notification-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.notification-dot.is-updating {
    animation: notification-pulse 0.4s ease-in-out;
}

/* ==========================================================================
   14. INTERACTION STATES (:active, :hover)
   ========================================================================== */

/* 14a. :active (Tap/Click Feedback)
   -------------------------------------------------------------------------- */

.btn--primary:active {
    background-color: var(--primary-accent-hover);
}

.btn--secondary:active {
    background-color: var(--bg-tertiary-hover);
}

.btn--danger:active {
    background-color: var(--danger-accent-hover);
}

.btn--primary.is-joined:active {
    background-color: var(--bg-tertiary-hover);
}

.header-icon:active {
    color: var(--header-icon-hover);
}

.center-post-button:active {
    background-color: var(--bg-tertiary-hover);
}

.timeline-list a:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.create-timeline-menu-link:active {
    color: var(--header-icon) !important;
}

.filter-link:active {
    background-color: var(--bg-tertiary-hover);
}

.filter-link.is-active:active {
    background-color: var(--primary-accent-hover);
}

.post-trigger-form:active {
    background-color: var(--bg-tertiary);
}

.timeline-showcase-item:active {
    background-color: var(--bg-tertiary);
}

.notification-item:active {
    background-color: var(--bg-tertiary);
}

.notification-item.unread:active {
    background-color: rgba(0, 122, 255, 0.15);
}

.restore-account-link:active {
    color: var(--text-primary);
}

.pagination a:active {
    background-color: var(--bg-secondary);
}

/* 14b. :hover (Mouse Hover)
   -------------------------------------------------------------------------- */

@media (hover: hover) {
    a:hover {
        text-decoration: none;
    }

    .header-icon:hover {
        color: var(--header-icon-hover);
        text-decoration: none;
    }

    .center-post-button:hover {
        background-color: var(--bg-tertiary-hover);
    }

    .timeline-list a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        text-decoration: none;
    }

    .create-timeline-menu-link:hover {
        color: var(--header-icon) !important;
    }

    .timeline-showcase-item:hover {
        background-color: var(--bg-tertiary);
        border-radius: 1.2rem;
    }

    .timeline-showcase-item:hover h3 {
        text-decoration: none;
    }

    .restore-account-link:hover {
        color: var(--text-primary);
        text-decoration: none;
    }

    .filter-link:hover {
        background-color: var(--bg-tertiary-hover);
        text-decoration: none;
    }

    .filter-link.is-active:hover {
        background-color: var(--primary-accent-hover);
    }

    .post-trigger-form:hover {
        background-color: var(--bg-tertiary);
    }

    html[data-theme="dark"] .post-trigger-form:hover {
        border-color: #555;
    }

    .item-timeline-name a:hover {
        text-decoration: none;
    }

    .item-timestamp a:hover {
        text-decoration: none;
    }

    .read-more-button:hover i {
        color: var(--primary-accent-hover);
    }

    .item-actions button.like-button:hover {
        color: var(--danger-accent);
    }

    .item-actions button.reply-button:hover {
        color: var(--primary-accent);
    }

    .delete-item-button:hover {
        color: var(--danger-accent) !important;
        opacity: 1;
    }

    .btn--primary:hover {
        background-color: var(--primary-accent-hover);
        color: var(--text-on-primary-button);
        text-decoration: none;
    }

    .btn--primary.is-joined:hover {
        background-color: var(--bg-tertiary-hover);
        color: var(--text-primary);
    }

    .btn--secondary:hover {
        background-color: var(--bg-tertiary-hover);
        text-decoration: none;
    }

    .btn--danger:hover {
        background-color: var(--danger-accent-hover);
    }

    .btn--warning:hover {
        opacity: 0.85;
    }

    .mute-word-list .remove-mute-word-btn:hover {
        color: var(--danger-accent-hover);
    }

    .modal-close-button:hover {
        background: transparent;
        opacity: 0.4;
    }

    .pagination a:hover {
        background-color: var(--bg-secondary);
        text-decoration: none;
    }

    .footer-links a:hover {
        color: var(--text-primary);
        text-decoration: none;
    }

    .new-posts-indicator button:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }

    .info-box-close-btn:hover {
        background-color: transparent;
        opacity: 0.4;
    }

    html[data-theme="dark"] .info-box-close-btn:hover {
        background-color: transparent;
        opacity: 0.8;
        color: var(--text-primary);
    }
}

/* ==========================================================================
   15. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */

/* 15a. Tablet & Desktop (768px and up)
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
    .content-list-container {
        padding: 4rem;
    }

    .hero-section {
        padding: 8rem 3.2rem;
    }
}

/* 15b. Mobile (max-width: 767px)
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
    body {
        font-size: 1.4rem;
        padding-bottom: 10rem;
    }

    .page-container {
        padding-left: 1.6rem;
        padding-right: 1.6rem;
    }

    .header-wrapper {
        padding: 0 1.6rem calc(1.6rem + env(safe-area-inset-bottom, 0rem));
    }

    .main-container {
        margin-top: 0.8rem;
        margin-bottom: 0.8rem;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-section {
        padding: 4.8rem 1.6rem;
        margin-top: 2.4rem;
    }

    .hero-logo {
        font-size: 6rem;
    }

    .hero-tagline {
        font-size: 2.4rem;
    }

    .content-list-container {
        padding: 2.4rem 2rem; /* 1.6remから調整 */
        border-radius: 2rem;
    }

    .create-timeline-form,
    .simple-form {
        padding: 2rem;
    }

    .form-notices {
        padding: 1.6rem;
    }

    .form-notice {
        font-size: 1.2rem;
    }

    .item-card {
        padding: 0;
    }

    .item-card-content-swiper {
        padding: 1.2rem 0;
    }

    .item-content-wrapper {
        margin-bottom: 0.4rem;
    }

    .date-divider {
        margin: 2rem 0;
    }

    .header {
        padding: 0.8rem 1.6rem;
        border-radius: 2.8rem;
        max-height: 5.6rem;
    }

    .header-main {
        height: 4rem;
    }

    .center-post-button {
        width: 4rem;
        height: 4rem;
        font-size: 1.9rem;
    }

    .header-container.is-open .header {
        max-height: 70vh;
        border-radius: 2.8rem;
    }

    .header-right {
        gap: 2.4rem;
    }

    .header-logo {
        font-size: 2.4rem;
    }

    .breadcrumb-back-link {
        font-size: 1.9rem;
    }

    .breadcrumb-title .content-title {
        font-size: 2rem;
    }

    .breadcrumb-separator {
        font-size: 1.8rem;
    }

    .timeline-filter-menu {
        gap: 0.8rem;
    }
    
    .filter-link {
        padding: 0.8rem 1.4rem; /* モバイルは少しパディングを詰める */
    }    
    .content-header-actions {
        flex-wrap: nowrap; 
        overflow-x: auto; 
        -ms-overflow-style: none;
        scrollbar-width: none;  
        max-width: 100%; 
        padding-bottom: 4px; 
        margin-bottom: -4px;
    }

    .content-header-actions::-webkit-scrollbar {
        display: none;
    }
    
    .content-title {
        font-size: 2.1rem;
    }

    .item-content {
        font-size: 1.4rem;
        line-height: 1.65;
        padding: 1.2rem 1.6rem;
    }

    .item-timestamp {
        font-size: 1.1rem;
    }

    .timeline-showcase-item h3 {
        font-size: 1.5rem;
    }

    .timeline-showcase-item .item-description {
        font-size: 1.2rem;
    }

    .btn {
        font-size: 1.3rem;
        padding: 0.9rem 1.6rem;
    }

    .btn--large {
        font-size: 1.4rem;
        padding: 1.2rem 2.4rem;
    }

    .form-control {
        padding: 1.2rem;
    }

    .form-group label,
    .form-group .form-label-heading {
        font-size: 1.4rem;
    }

    .modal-content {
        padding: 2.4rem;
        border-radius: 2.4rem;
    }

    .form-modal h2,
    .view-modal-content h2,
    .info-modal-content h2 {
        font-size: 1.9rem;
    }

    .modal-actions .btn {
        font-size: 1.4rem;
    }

    .flash-message-container {
        font-size: 1.3rem;
        padding: 1rem 1.6rem;
    }

    .notification-text {
        font-size: 1.4rem;
    }

    .notification-timestamp {
        font-size: 1.1rem;
    }

    .new-posts-indicator {
        top: calc(0.8rem + env(safe-area-inset-top, 0rem));
    }

    .new-posts-indicator button {
        padding: 0.8rem 1.6rem;
        font-size: 1.2rem;
    }
    
    .btn--icon-text-mobile .btn-text-mobile-hidden {
        display: none;
    }
    .btn--icon-text-mobile .fas {
        margin-right: 0;
    }    
    .btn.btn--icon-text-mobile.btn--with-dot .new-timeline-dot {
        top: 0.4rem;
        right: 0.5rem;
        border-width: 0.15rem;
    }    
    .read-more-button {
        width: 4.4rem;
        height: 4.4rem;
        bottom: 0;
    }

    .read-more-button i {
        font-size: 1.5rem;
    }
    
    .hot-thread-item h3 {
        font-size: 1.4rem;
    }    
}

/* 15c. Large Modal (max-width: 900px)
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
    #content-modal-overlay .modal-content {
        max-width: 90vw;
    }
}

.btn--share-x,
.btn--copy-timeline,
.btn--edit-timeline {
    /* 正円にするためのスタイル */
    width: 3.6rem;
    height: 3.6rem;
    padding: 0 !important;
    font-size: 1.4rem !important;
    flex-shrink: 0; /* [ここを追加] ボタンが縮まないようにする */
}
.btn--share-x i,
.btn--copy-timeline i,
.btn--edit-timeline i {
    margin-right: 0 !important;
}
/* X (Twitter) アイコンの色 */
.btn--share-x {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .btn--share-x {
     color: var(--text-primary) !important;
}

/* 16c. Share
   -------------------------------------------------------------------------- */
.share-actions {
    margin-top: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.4rem;
    background-color: var(--bg-secondary);
    border-radius: 999px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: background-color 0.2s, border-color 0.2s;
}

.share-actions a:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.share-actions a .fab {
    font-size: 1.4rem;
}

/* ==========================================================================
   17. CUSTOM MODAL STYLES (JOIN CONFIRM)
   ========================================================================== */

#join-confirm-modal-body a {
    color: var(--primary-accent);
    text-decoration: underline;
}

#join-confirm-modal-body a:hover {
    color: var(--primary-accent-hover);
}

#join-confirm-modal-body h2,
#join-confirm-modal-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}

#join-confirm-modal-body h2 {
    font-size: 1.7rem;
}

#join-confirm-modal-body h3 {
    font-size: 1.5rem;
}

#join-confirm-modal-body ul,
#join-confirm-modal-body ol {
    margin: 1em 0;
    padding-left: 2em;
}

#join-confirm-modal-body li {
    margin-bottom: 0.5em;
}

#join-confirm-modal-body *:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   18. GENERIC CONFIRM MODAL
   ========================================================================== */

#generic-confirm-body {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    white-space: pre-wrap; /* \n を改行として表示 */
    word-break: break-word;
}

/* ==========================================================================
   19. QUOTED POST STYLES
   ========================================================================== */

.quoted-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem; /* 引用本文との間に余白を追加 */
}

.original-post-quote .quoted-author {
    margin-bottom: 0; /* 元々あった余白をリセット */
}

.original-post-quote .copy-button {
    font-size: 1.1rem;
    padding: 0.2rem 0.8rem;
    margin-left: auto; /* ボタンを右寄せ */
    flex-shrink: 0; /* ボタンが縮まないように */
}

/* ==========================================================================
   20. ADMIN-ONLY STYLES
   ========================================================================== */

.admin-info-button {
    padding: 0.4rem 0.6rem !important;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    background-color: transparent !important;
    color: var(--text-secondary) !important;
    border: none !important;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
}

.admin-info-button:hover,
.admin-info-button:active {
    opacity: 1;
    color: var(--primary-accent) !important;
    background-color: transparent !important;
    text-decoration: none;
}

.item-header .admin-info-button {
    margin-left: -0.4rem;
}

.timeline-showcase-item h3 .admin-info-button {
    margin-left: 0.8rem;
    order: 3; /* タイトルの右側に配置 */
}

.content-header-actions .admin-info-button {
    padding: 0.9rem 1.0rem !important;
    font-size: 1.3rem !important;
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.content-header-actions .admin-info-button:hover,
.content-header-actions .admin-info-button:active {
    background-color: var(--bg-tertiary-hover) !important;
    color: var(--primary-accent) !important;
}

.admin-info-modal-body {
    font-size: 1.2rem;
    line-height: 1.5;
}

.admin-info-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-info-modal-body > .admin-info-header:first-child {
    margin-top: 0;
}

.admin-info-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-info-table th,
.admin-info-table td {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    vertical-align: top;
    word-break: break-all;
}

.admin-info-table th {
    width: 35%;
    text-align: left;
    font-weight: 700;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.admin-info-table td {
    width: 65%;
    font-family: monospace;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.admin-info-table td em {
    color: var(--text-secondary);
    font-style: italic;
}