:root { --primary: #00a8e8; --bg: #f4f9f9; --text: #333; --white: #fff; --shadow: 0 5px 15px rgba(0,0,0,0.08); }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: sans-serif; background: var(--bg); color: var(--text); padding-top: 70px; min-height: 100vh; display: flex; flex-direction: column; }

/* ヘッダー */
.header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: fixed; width: 100%; top: 0; z-index: 1000; }
.header-inner { display: flex; justify-content: space-between; align-items: center; max-width: 1000px; margin: 0 auto; padding: 15px; }
.logo h1 { color: var(--primary); font-size: 1.4rem; }
.pc-nav ul { display: flex; list-style: none; gap: 20px; }
.pc-nav a, .pc-nav button { text-decoration: none; color: var(--text); font-weight: bold; background: none; border: none; cursor: pointer; font-size: 1rem;}

/* ハンバーガーメニュー */
/* .hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; background: none; border: none; padding: 5px; }
.hamburger span {display: block; width: 25px; height: 15px; background: var(--text); transition: 0.3s; } */
.mobile-menu { display: none; background: var(--white); box-shadow: var(--shadow); position: absolute; top: 75px; left: 0; width: 100%; padding: 20px; z-index: 0; }
.mobile-menu.active{ display: block; }
.mobile-menu ul { list-style: none; }
.mobile-menu li { margin-bottom: 15px; text-align: center; }
.mobile-menu a, .mobile-menu button { text-decoration: none; color: var(--text); font-weight: bold; font-size: 1.1rem; background: none; border: none; }
/*ハンバーガーメニュー2*/
.hamburger{
display: none;
	position: relative;/*ボタン内側の基点となるためrelativeを指定*/
	background:#D54884;
	cursor: pointer;
    width: 50px;
    height:50px;
	border-radius: 5px;
}

/*ボタン内側*/
.hamburger span{
    display: inline-block;
    transition: all .4s;/*アニメーションの設定*/
    position: absolute;
    left: 14px;
    height: 2px;
    border-radius: 5px;
	background: #fff;
  	width: 45%;
  }


.hamburger span:nth-of-type(1) {
	top:13px;	
}

.hamburger span:nth-of-type(2) {
	top:19px;
}

.hamburger span:nth-of-type(3) {
	top:25px;
}

.hamburger span:nth-of-type(3)::after {
	content:"Menu";/*3つ目の要素のafterにMenu表示を指定*/
	position: absolute;
	top:5px;
	left:-2px;
	color: #fff;
	font-size: 0.6rem;
	text-transform: uppercase;
}

/*activeクラスが付与されると線が回転して×になり、Menu⇒Closeに変更*/

.hamburger.active span:nth-of-type(1) {
    top: 14px;
    left: 18px;
    transform: translateY(6px) rotate(-45deg);
    width: 30%;
}

.hamburger.active span:nth-of-type(2) {
	opacity: 0;
}

.hamburger.active span:nth-of-type(3){
    top: 26px;
    left: 18px;
    transform: translateY(-6px) rotate(45deg);
    width: 30%;
}

.hamburger.active span:nth-of-type(3)::after {
	content:"Close";/*3つ目の要素のafterにClose表示を指定*/
    transform: translateY(0) rotate(-45deg);
	top:5px;
	left:4px;
}

/* 共通レイアウト */
.container { max-width: 900px; margin: 20px auto; padding: 0 15px; flex: 1; width: 100%; }
.card { background: var(--white); padding: 25px; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 20px; }
.btn-main { background: var(--primary); color: white; border: none; padding: 12px; border-radius: 5px; cursor: pointer; width: 100%; font-weight: bold; text-align: center; display: inline-block; text-decoration: none;}
.btn { background: #99cc65; color: #fff;  border-radius: 8px; padding: .75rem 1.5rem;} 
/* 掲示板グリッド (PC2カラム・スマホ1カラム) */
.grid-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.post-card { background: white; padding: 20px; border-radius: 10px; box-shadow: var(--shadow); }

/* チャット */
.chat-layout { display: flex; height: 70vh; background: white; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.chat-sidebar { width: 200px; border-right: 1px solid #eee; padding: 15px; overflow-y: auto; background: #fafafa; }
.chat-sidebar li { padding: 10px; cursor: pointer; border-radius: 5px; list-style: none; margin-bottom: 5px;}
.chat-sidebar li.active { background: var(--primary); color: white; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-messages { flex: 1; padding: 15px; overflow-y: auto; background: #f0f7f9; display: flex; flex-direction: column; gap: 10px;}
.message { padding: 10px 15px; border-radius: 10px; max-width: 75%; }
.message.mine { align-self: flex-end; background: var(--primary); color: white; }
.message.others { align-self: flex-start; background: white; }
.message img { max-width: 100%; border-radius: 5px; margin-top: 5px; }

/* スマホ対応 */
@media (max-width: 768px) {
    .pc-nav { display: none; }
    .hamburger { display: flex; }
    .grid-container { grid-template-columns: 1fr; } /* おすすめ：スマホは1カラム */
    .chat-layout { flex-direction: column; }
    .chat-sidebar { width: 100%; height: 60px; display: flex; overflow-x: auto; flex-direction: row; align-items: center;}
    .chat-sidebar li { margin: 0 5px 0 0; white-space: nowrap; }
}
/* ソーシャルボタン用追加CSS */
.btn-google {
    background: #db4437;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-google:hover { background: #c53929; }

.btn-discord {
    background: #5865F2;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-discord:hover { background: #4752c4; }

.text-center { text-align: center; }

/* トップページ：ヒーローセクション */
.hero { text-align: center; padding: 80px 20px; }
.hero h2 { font-size: 3.5rem; color: var(--primary); margin-bottom: 20px; letter-spacing: 2px; }
.hero p { font-size: 1.2rem; color: #555; line-height: 1.8; margin-bottom: 30px; }

@media (max-width: 768px) {
    .hero h2 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
}

/* フォームの共通デザイン追加 */
input, textarea { border: 1px solid #ccc; border-radius: 5px; font-family: inherit; }

/* ログイン中のユーザー表示（ヘッダ） */
.nav-userdisplay { display: inline-flex; align-items: center; gap: 8px; }
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.user-avatar-img {
    object-fit: cover;
    background: #ddd;
    border: 1px solid rgba(0,0,0,0.08);
}
.user-name { font-weight: bold; color: var(--text); max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-menu .nav-userdisplay { justify-content: center; }

/* SNSアイコン */
.footer {
    padding: 32px 20px 24px;
    text-align: center;
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.sns-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.sns-icons a {
    display: block;
    width: 52px;
    height: 52px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sns-icons a:hover,
.sns-icons a:focus-visible {
    transform: translateY(-3px);
    opacity: 0.85;
}

.sns-icons svg {
    display: block;
    width: 100%;
    height: 100%;
}

.footer p {
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .sns-icons {
        gap: 10px;
    }

    .sns-icons a {
        width: 44px;
        height: 44px;
    }
}

/* TOPへ戻るボタン */
.back-to-top-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1001;
    display: block;
    padding: 12px 16px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-to-top-float.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-float:hover,
.back-to-top-float:focus-visible {
    background: #008fca;
}

@media (max-width: 480px) {
    .back-to-top-float {
        right: 16px;
        bottom: 16px;
        padding: 10px 14px;
    }
}
