/* ■■■■■■■■■■ グローバル変数のroot ■■■■■■■■■■ */
:root { 
  --body_pad: 200px; /* bodyの左右の余白 */
  --title_size: 30px;
	--word-break: break-all; /* 単語の途中でも折り返す */
}



/* ■■■■■■■■■■ ヘッダー、ポップアップ、タイトル、アイコン ■■■■■■■■■■ */
.head {
  display: grid;
  position: absolute;
  width: 100%;
  height: 100%; /* ヘッダーの高さを固定したいなら指定 */
  top: 0;
  left: 0;
  grid-template-columns: 50% 50%;
  grid-template-rows: 50% 50%;
	z-index: -1;
}
.head > :nth-child(1) { justify-self: start; align-self: start; }
.head > :nth-child(2) { justify-self: end; align-self: start; }
.head > :nth-child(3) { justify-self: start; align-self: end; }
.head > :nth-child(4) { justify-self: end; align-self: end; }

.title-c {
  position: absolute;
  top: calc(0px - (var(--title_size)/2 - 5px));
  left: 0;
  display: flex;
	column-gap: 10px;
  font-size: var(--title_size);
}
.title-c img {
	padding-top: calc((var(--title_size)/2) - 5px);
  width: calc(2*var(--title_size));
  height: calc(2*var(--title_size));
  object-fit: contain;
}
.title-c section:nth-child(2) {
	margin-top: calc(var(--title_size)/3);
	white-space: nowrap;
	overflow: hidden;
}

#popup, #C_popup {
  display: none;
	position: fixed;
	font-weight: bold;
	color: #a30f0f;
	background: #fcd1d1;
	padding-left: 10px;
	width: 100vw;
	top: 0;
	left: 0;
	z-index: 10000;
}
@keyframes shake {
	0% { transform: translateX(0); }
	20% { transform: translateX(-5px); }
	40% { transform: translateX(5px); }
	60% { transform: translateX(-5px); }
	80% { transform: translateX(5px); }
	100% { transform: translateX(0); }
}
.shake {
	animation: shake 0.3s;
}

#icon {
	--cursor: pointer;
	cursor: var(--cursor);
}

#trash {
	cursor: pointer;
}

#word_break {
	cursor: pointer;
}


/* ■■■■■■■■■■ 色のクラス ■■■■■■■■■■ */
.red {
  color: #a30f0f!important;
	background: #fcd1d1!important;
}
.blue {
	color: #1e0fa3!important;
	background: #d1d7fc!important;
}
.yellow {
	color: #e0974e!important;
	background: #f0e79c!important;
}
.orange {
	color: #d8710a!important;
	background: #ebda48!important;
}
.green {
	color: #0fa31e!important;
	background: #d1fcda!important;
}


/* ■■■■■■■■■■ 基本 ■■■■■■■■■■ */
body {
  font-family: "Klee One", Arial;
  padding:  20px var(--body_pad);
	overflow: hidden;
}
body.loading { cursor: progress; }
a {
	text-decoration: underline;
	text-underline-offset: 4px;
	color: #081ee1;
}
a:hover {
	color: #6936e1;
}





/* ■■■■■■■■■■ その他 ■■■■■■■■■■ */








/* ■■■■■■■■■■ 発射フィールド ■■■■■■■■■■ */
#launcher-c {
	display: none; /* [JS] 受信フィールドとスイッチする */
  width: 100%;
  margin: auto;
}

/* 上の画像セクション */
#launcher-c section:first-child {
  text-align: center;
  margin-bottom: 10px;
}
#launcher-c img {
  width: 200px;
	height: auto;
}

/* 下の２カラムセクション */
#launcher-c section:nth-child(2) {
  display: grid;
  grid-template-columns: 65% 32.5%;
  gap: 20px;
	height: 300px;
	border: 1px solid #333;
	padding: 5px;
}

#launcher_text {
  width: 100%;
  height: 85%;
	padding: 5px;
  resize: none;
	font-family: "Klee One";
	font-weight: bold;
  font-size: 20px;
  border: 2px dashed #ccc;
  border-radius: 5px;
	word-break: var(--word-break);
}
#launcher_text:focus {
	outline: unset;
  border: 3px solid #2196f3; /* 青色の実線枠 */
  box-shadow: 0 0 5px rgba(33, 150, 243, 0.5); /* うっすら青く光るエフェクト（任意） */
}

#text_counter { display: none; /* [JS] テキストエリアに文字があるときのみ表示 */ }
#char_count { color: red; }

#clip, #text {
	display: none; /* [JS] clipボタンとtextボタンでスイッチする */
	position: relative;
  font-size: 20px;
  border: unset;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}
#clip::after, #text::after {
  content: "発射";
  position: absolute;
  font-family: "Yuji Mai";
  font-size: 55px;
  color: #bd1313;
	width: 100%;
	top: 50%; left: 50%; transform: translate(-50%, -50%);
} #text::after { color: #f9b9b9; }
#clip::before, #text::before {
	content: attr(t);
  position: absolute;
	font-family: "Yuji Syuku";
	width: 100%;
	top: 0; left: 50%; transform: translateX(-50%);
}
#clip { color: #000; background-color: #f5b65e; }
#text { color: #fff; background-color: #2f93ff; }
#clip:hover { background-color: #ed9820; }
#text:hover { background-color: #0056b3; }







/* ■■■■■■■■■■ 受信フィールド ■■■■■■■■■■ */
#receive-c {
	display: none; /* [JS] 発射フィールドとスイッチする */
  width: 100%;
  margin: auto;
}

/* 上の画像とテキストの２カラムセクション */
#receive-c section:first-child {
  display: grid;
  grid-template-columns: 30% 68%;
  gap: 2%;
	height: 300px;
	margin-top: calc((var(--title_size)/2) + 5px);
}

#receive-c img {
	width: 100%;
  height: auto;
  object-fit: contain;
}

#receive_text {
	display: block;
	font-family: "Klee One";
	font-weight: bold;
  font-size: 20px;
	padding: 10px;
	border: 1px solid #333;
  border-radius: 8px;
	word-break: var(--word-break);
  overflow-y: auto; /* 拡張されずに内部でスクロールするように */
	white-space: pre-line; /* \nを有効化 */
}

#get {
	display: block;
	margin-top: 10px;
	font-family: "Yuji Syuku";
	font-size: 100px;
  color: #e1feda;
	background-color: #28a745;
	border-radius: 8px;
	width: 80%;
	height: 200px;
	margin: auto;
	margin-top: 25px;
	cursor: pointer;
	transition: background-color 0.2s;
}
#get:hover {
  background-color: #1e7e34;
}











/* ■■■■■■■■■■ メディアクエリ ■■■■■■■■■■ */
@media (max-width: 1000px) {
	:root {
		--body_pad: 0px; /* bodyの左右の余白 */
		--title_size: 20px;
	}
	#launcher-c section:nth-child(2) {
		grid-template-columns: 65% 30%;
		gap: 20px;
	}
	#get {
		font-size: 50px;
		height: 100px;
	}
}