@charset "utf-8";
/**
* Available vars:
* @var --viewport-from: <number> - Number in pixels without the unit. Required if `--font-size` is not exist.
* @var --viewport-to: <number> - Number in pixels without the unit. Required if `--font-size` is not exist.
* @var --font-size-from: <number> - Number in pixels without the unit. Required if `--font-size` and `--min-font-size` is not exist.
* @var --font-size-to: <number> - Number in pixels without the unit. Required if `--font-size` and `--max-font-size` is not exist.
* @var --max-font-size: <number> - Number in pixels without the unit. Optional.
* @var --min-font-size: <number> - Number in pixels without the unit. Optional.
* @var --viewport-unit-converter: 1vw | 1vh | 1vmin | 1vmax - Optional. Default: 1vw.
* @var --font-size: <length> | <percentage> | <absolute-size> | <relative-size> | Global values - Optional.
*/
*,
*::before,
*::after {
  --viewport-unit-converter: 1vw;
  --fz-from: var(--font-size-from, var(--min-font-size));
  --fz-to: var(--font-size-to, var(--max-font-size));
  --fz-slope: (var(--fz-to) - var(--fz-from)) / (var(--viewport-to) - var(--viewport-from)) * 100;
  --fz-intercept: (var(--viewport-to) * var(--fz-from) - var(--viewport-from) * var(--fz-to)) / (var(--viewport-to) - var(--viewport-from));
  --font-size: calc(var(--fz-slope) * var(--viewport-unit-converter) + var(--fz-intercept) * 1px);

  --min-fz-px: calc(var(--min-font-size) * 1px);
  --max-fz-px: calc(var(--max-font-size) * 1px);
  --clamp: clamp(var(--min-fz-px), var(--font-size), var(--max-fz-px));
  --max: var(--has-max, var(--min));
  --min: var(--has-min, var(--font-size));
  --has-max: min(var(--max-fz-px), var(--font-size));
  --has-min: max(var(--min-fz-px), var(--font-size));

  font-size: var(--clamp, var(--max));
}

:root {
	--body_h: 100dvh;
	--body_w: 95dvw;

	--header_w: auto;
	--header_h: auto;
	--main_margin_left: 0;
	--main_margin_top: 0;
	--footer_h: auto;

	--dice_flex-flow: auto;
}

@media (orientation: portrait) {
	:root {
		--header_w: 100%;
		--header_h: 10dvh;
		--main_margin_left: 0;
		--main_margin_top: var(--header_h);
		--footer_h: auto;
		--dice_flex-flow: column nowrap;
	}
}

@media (orientation: landscape) {
	:root {
		--header_w: 20dvw;
		--header_h: calc(var(--body_h) - var(--footer_h));
		--main_margin_left: var(--header_w);
		--main_margin_top: 0;
		--footer_h: 30dvh;
		--dice_flex-flow: row nowrap;
	}
}

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

/* フォーカス時のスタイル */
*:focus-visible{
	outline: 2px solid #cd820a;
	outline-offset: 2px;
	animation-name: focusEffect;
	animation-duration: 0.3s;
}

@keyframes focusEffect {
	from {
		outline-width: 1px;
		outline-offset: 8px;
	}

	to {
		outline-width: 2px;
		outline-offset: 2px;
	}
}




.ly_display {
	width: 95dvw;
	height: 95dvh;
	display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
  gap: 2px 2px;
  grid-auto-flow: row;
  grid-template-areas:
    "Header List List List List"
    "Header List List List List"
    "Header List List List List"
    "Dice Dice Dice Dice Dice"
    "Dice Dice Dice Dice Dice";
}


.ly_display_header {
	position: sticky;
	grid-area: Header;
	padding: 8px;
	background-color: aquamarine;
}

.ly_display_main {
	grid-area: List;
	overflow-y: auto;
}


.ly_display_footer {
	position: sticky;
	grid-area: Dice;
	padding: 4px;
	background-color: azure;
	display: flex;
	flex-flow: column nowrap;
	gap: 8px;
}

.ly_footer_dice {
	display: flex;
	flex-flow: var(--dice_flex-flow);
	border: 1px solid black;
	padding: 4px;
	justify-content: space-between;
}

.bl_dice_wrapper {
	flex: auto;
	display: flex;
	flex-flow: row nowrap;
	justify-content: center;
	gap: clamp(4px, 4px + 0.5dvw, 16px);
}

.bl_dice {
	--size: 8dvh;

	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: black;
	font-size: var(--size);
	height: var(--size);
	width: var(--size);
}

.bl_dice:has(:checked) {
	color: gray;
}

.bl_dice:focus-within {
	outline: 2px solid #cd820a;
	outline-offset: 2px;
	animation-name: focusEffect;
	animation-duration: 0.3s;
	background-color: #efdbb1;
}

.bl_dice_chkbox {
	appearance: none;
	position: absolute;
	width: 1px;
	height: 1px;
	clip-path: inset(100%);
}

.el_btn {
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	background: none;
	border: none;

	padding: 2px;
	font-size: 4dvh;
	font-style: normal;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	letter-spacing: 0.04em;
	cursor: pointer;
	background-color: #111111;
	border: 2px solid transparent;
	color: #ffffff;
	border-radius: max(
		min(4px, calc(40px - 100%) * 9999),
		min(8px, calc(100% - 40px) * 9999, calc(120px - 100%) * 9999),
		min(12px, calc(100% - 120px) * 9999)
	);
}

.el_btn.el_btn_roll {
	display: flexbox;
	flex: auto;
}




.ly_footer_score {
	display: flex;
	flex-flow: row nowrap;
	gap: 4px;
	border: 1px solid black;
	padding: 2px;
	font-size: 4dvh;
}

.el_selectBox {
	flex: auto;
	font-size: 1em;
}

.el_btn.el_btn_submit {
	flex: 0 0 50px;
	font-size: 1em;
}
