/* uy-typings share (2026-10-27 v0.6.1) — the record card with a QR code and the challenge link.
   Ported from uy-games' uy-share.css with its own class names (uyt-share-*), so the two never clash. */

/* ---------- 挑戦状 ---------- */
.uyt-share-chip {
	background: rgba(255, 211, 122, 0.12);
	border: 1px solid rgba(255, 211, 122, 0.45);
	border-radius: 999px;
	padding: 4px 12px;
	color: #ffd37a;
	font-weight: 900;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.uyt-share-chip.is-clear {
	background: rgba(141, 255, 158, 0.14);
	border-color: rgba(141, 255, 158, 0.55);
	color: #8dff9e;
}

.uyt-share-banner {
	display: inline-block;
	margin: 0 0 10px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 211, 122, 0.14);
	border: 1px solid rgba(255, 211, 122, 0.5);
	color: #ffd37a;
	font-weight: 900;
	font-size: 13px;
}

.uyt-share-toast {
	position: absolute;
	top: 14%;
	left: 50%;
	transform: translateX(-50%) scale(0.9);
	z-index: 8;
	padding: 12px 22px;
	border-radius: 999px;
	background: rgba(5, 8, 16, 0.88);
	border: 1px solid rgba(255, 211, 122, 0.6);
	color: #ffd37a;
	font-weight: 900;
	font-size: 15px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s, transform 0.25s;
}

.uyt-share-toast.is-show {
	opacity: 1;
	transform: translateX(-50%) scale(1);
}

/* ---------- シェアモーダル ---------- */
.uyt-share-modal {
	position: fixed;
	inset: 0;
	z-index: 10010;
	display: grid;
	place-items: center;
	padding: 18px;
}

.uyt-share-modal[hidden] {
	display: none !important;
}

.uyt-share-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 5, 12, 0.78);
	backdrop-filter: blur(3px);
}

.uyt-share-modal__dialog {
	position: relative;
	width: min(560px, 96vw);
	background: rgba(10, 15, 30, 0.97);
	border: 1px solid rgba(0, 209, 255, 0.35);
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
	padding: 18px 18px 14px;
	text-align: center;
	color: #dfe8f6;
}

.uyt-share-modal__x {
	position: absolute;
	top: 8px;
	right: 12px;
	background: none;
	border: none;
	color: #9bb0d7;
	font-size: 26px;
	cursor: pointer;
	line-height: 1;
}

.uyt-share-modal__head {
	margin: 0 0 10px;
	font-weight: 900;
	font-size: 17px;
	color: #ffd37a;
}

.uyt-share-modal__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.16);
}

.uyt-share-modal__img[hidden],
.uyt-share-result__img[hidden] {
	display: none;
}

.uyt-share-modal__hint {
	margin: 10px 0 12px;
	font-size: 12px;
	color: #9bb0d7;
	line-height: 1.7;
}

.uyt-share-modal__hint b {
	color: #8fefff;
}

.uyt-share-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.uyt-share-modal__btn {
	cursor: pointer;
	border-radius: 999px;
	padding: 10px 18px;
	font-weight: 900;
	font-size: 14px;
	border: 1px solid rgba(0, 209, 255, 0.45);
	background: rgba(0, 209, 255, 0.1);
	color: #fff;
	font-family: inherit;
}

.uyt-share-modal__btn.is-primary {
	background: linear-gradient(180deg, rgba(0, 209, 255, 0.3), rgba(255, 255, 255, 0.05));
}

.uyt-share-modal__btn.is-ghost {
	border-color: rgba(255, 255, 255, 0.2);
	background: transparent;
	color: #9bb0d7;
}

.uyt-share-modal__status {
	margin: 10px 0 0;
	font-size: 12.5px;
	color: #8dff9e;
	font-weight: 700;
	min-height: 1.2em;
	overflow-wrap: anywhere;
}

/* ---- 結果画面インライン表示（カードを最初から見せる／全ゲーム共通） ---- */
.uyt-share-result {
	margin: 12px auto 0;
	max-width: 264px;
	text-align: center;
}

.uyt-share-result[hidden] {
	display: none;
}

.uyt-share-result__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
	cursor: pointer;
}

.uyt-share-result__goal {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 800;
	color: #ffd75e;
	line-height: 1.5;
}

.uyt-share-result__btn {
	margin-top: 8px;
	width: 100%;
	padding: 10px 14px;
	border-radius: 999px;
	border: 0;
	font-weight: 800;
	font-size: 14px;
	cursor: pointer;
	color: #0b1020;
	background: linear-gradient(135deg, #7ef0ff, #6ea8ff);
}

.uyt-share-result__btn:active {
	transform: translateY(1px);
}

/* 称号未満のとき出す控えめな「カードを見る」リンク */
.uyt-share-result__link {
	margin-top: 6px;
	background: transparent;
	border: 0;
	padding: 4px 8px;
	font-size: 12.5px;
	font-weight: 700;
	color: #9bb0d7;
	text-decoration: underline;
	cursor: pointer;
}

/* ---- uy-typings additions ---- */
.uyt-share-result__note {
	margin: 6px 0 0;
	font-size: 12px;
	color: #9bb0d7;
}

.uyt-share-rowbtn[hidden] {
	display: none !important;
}

/* the window covers the game box (or the whole screen in 「大きく遊ぶ」) and scrolls on a short screen */
.uyt-share-modal {
	overflow-y: auto;
}

.uyt-share-modal__dialog {
	margin: auto;
}

@media (max-height: 520px) {
	.uyt-share-modal { padding: 8px; }
	.uyt-share-modal__dialog { width: min(520px, 96vw); padding: 12px 12px 10px; }
	.uyt-share-modal__hint { margin: 6px 0 8px; font-size: 11px; line-height: 1.5; }
	.uyt-share-modal__img { width: auto; max-width: 100%; max-height: calc(100vh - 150px); margin: 0 auto; }
	.uyt-share-modal__head { margin-bottom: 6px; font-size: 15px; }
	.uyt-share-modal__btn { padding: 7px 14px; }
	/* a short screen (a phone held sideways): the retry button must stay in reach — the card is behind 「📤 きろくをシェア」 */
	.uyt-share-result { display: none !important; }
}

/* ---- buttons keep their own colors in every state (themes paint every <button> on :hover / :focus) ---- */
.uyt-share-modal .uyt-share-modal__btn:hover,
.uyt-share-modal .uyt-share-modal__btn:focus,
.uyt-share-modal .uyt-share-modal__btn:active { background: rgba(0, 209, 255, 0.2); border-color: rgba(0, 209, 255, 0.75); color: #fff; box-shadow: none; text-shadow: none; }
.uyt-share-modal .uyt-share-modal__btn.is-primary:hover,
.uyt-share-modal .uyt-share-modal__btn.is-primary:focus,
.uyt-share-modal .uyt-share-modal__btn.is-primary:active { background: linear-gradient(180deg, rgba(0, 209, 255, 0.42), rgba(255, 255, 255, 0.08)); color: #fff; }
.uyt-share-modal .uyt-share-modal__btn.is-ghost:hover,
.uyt-share-modal .uyt-share-modal__btn.is-ghost:focus,
.uyt-share-modal .uyt-share-modal__btn.is-ghost:active { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.35); color: #c9d6ee; }
