@charset "UTF-8";
/* CSS Document */

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video,
input {
	margin: 0;
	padding: 0;
	border: 0;
	font: inherit;
	font-size: 100%;
	vertical-align: baseline;
	box-sizing: border-box;
}
html {
	font-size: 100%;
	line-height: 1;
}
ol,
ul {
	list-style: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
caption,
th,
td {
	text-align: left;
	font-weight: normal;
	vertical-align: middle;
}
q,
blockquote {
	quotes: none;
}
q:before,
q:after,
blockquote:before,
blockquote:after {
	content: "";
	content: none;
}
a img {
	border: none;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
	display: block;
}
button {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	-webkit-text-size-adjust: 100%;
}
button, input, select, textarea {
	font-family: inherit;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit;
	color: inherit;
}
.disable-all {
  pointer-events: none; /* クリックやホバーを無効化 */
  user-select: none;    /* テキストの選択・反転を禁止 */
}

/* base */
.weight100 { font-weight: 100; }
.weight200 { font-weight: 200; }
.weight300 { font-weight: 300; }
.weight400 { font-weight: 400; }
.weight500 { font-weight: 500; }
.weight600 { font-weight: 600; }
.weight700 { font-weight: 700; }
.weight900 { font-weight: 900; }
:root {
	--bg-color: #eceff3;
	--bg-color2: #f9fafb;
	--bg-color3: #e3e5e9;
	--bg-color4: #c9ced5;
	--bg-color5: #ebecee;
	
	--text-color: #333333;
	--text-color2: #999999;
	--text-color3: #c6c6c6;
	
	--border-color: #d5dbe3;

	--color-yang-stable: #aa987c;
	--color-yang-moving: #8c2727;
	--color-yin-stable: #5e676d;
	--color-yin-moving: #3a4b63;

	--color-red: #d30014;
	--link-color: #4597e3;
}
.mincho {
	font-family: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}

input[type="checkbox"] {
    accent-color: var(--color-red);
}

a {
	color: var(--link-color);
	text-decoration: underline;
	transition: color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease, text-decoration-color 0.3s ease, transform 0.3s ease;
}

a span {
	transition: color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
}

a:hover {
	opacity: 0.7;
	text-decoration: none;
}

body {
	font-family: 'Roboto', 'Noto Sans JP', sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	line-height: 1.6;
}
body.guide {
	background-color: #fff;
}

.site-footer {
    margin: 0;
    padding: 0.6rem 1rem;
    box-sizing: border-box;
    text-align: center;
    color: var(--text-color2);
    font-size: 0.75rem;
    line-height: 1.4;
}

/* コーナータイトルは通常の配置から外し、卦枠の開始位置を維持する。 */
.has-corner-title {
    position: relative;
}
.site-corner-title {
    position: absolute;
    top: calc(70px + 0.6rem);
    left: 3%;
    display: flex;
    align-items: center;
    gap: 0.35em;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.5;
	letter-spacing: 0.05em;
    color: var(--text-color3);
}
.site-corner-title img {
    display: block;
    flex-shrink: 0;
    width: 1.5em;
    height: 1.5em;
    object-fit: contain;
    opacity: 0.4;
}
.gua-index .site-corner-title,
.hakke-page .site-corner-title {
    left: 0;
}
.has-corner-title .baika-control > h2,
.has-corner-title .input-page-title {
    visibility: hidden;
}
@media (max-width: 767px) {
    .site-corner-title {
        top: 0.25rem;
        left: 4.5%;
		font-size: 1.25rem;
    }
    .site-corner-title img {
        width: 1.2em;
        height: 1.2em;
    }
    .gua-index .site-corner-title,
    .hakke-page .site-corner-title {
        top: 0.25rem;
        left: 4.5%;
    }
    .corner-title-only {
        margin-top: 40px;
    }
}

.site-footer small {
    font-size: inherit;
}

.site-footer-standalone {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
}

@media screen and (max-width: 767px) {
    main .container:has(> .hexagram-wrap + .site-footer-in-container) {
        display: flex;
        flex-direction: column;
        min-height: calc(100dvh - 40px);
        box-sizing: border-box;
        /* copyrightの下間隔と、固定ボタンに隠れないための領域を分ける。 */
        padding-bottom: calc(0.15rem + var(--bottom-controls-height, 3.9em));
    }

    main .container:has(> .hexagram-wrap + .site-footer-in-container) > :not(.btn-box) {
        flex-shrink: 0;
    }

    .container:has(> .site-footer-in-container) > .hexagram-wrap {
        margin-bottom: 0;
    }

    .hexagram-wrap + .site-footer-in-container {
        margin-top: auto;
        padding-top: 0.15rem;
        padding-bottom: 0;
    }

    /* 占うページでは、余った高さを卦の上の操作領域へ配分する。 */
    .container:has(> .hexagram-wrap + .site-footer-in-container) > :is(.divination-operation-area, .baika-control, .input-intro) {
        flex: 1 0 var(--divination-operation-height);
        height: auto;
        min-height: var(--divination-operation-height);
    }

    .container:has(> .divination-operation-area, > .baika-control, > .input-intro) > .hexagram-wrap + .site-footer-in-container {
        margin-top: 0;
    }
}

@media screen and (min-width: 768px) {
    main .container:has(> .site-footer-in-container) {
        padding-bottom: 2.5rem;
    }

    .site-footer-in-container {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
    }
}
header {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9998;
	width: 100%;
	height: 70px;
	margin: 0 auto;
	padding: 0 3%;
	background:  var(--bg-color2);
	box-sizing: border-box;
	border-bottom: 1px solid var(--border-color);
}
.wrapper {
    display: flex;
	justify-content: center;
	max-width: 1200px;
    margin: 0 auto 0; /*header高さ分*/
	padding: 0 3%;
    box-sizing: border-box;
	transition: transform 0.3s ease;
}
.guide.wrapper {
	display: inherit;
	padding: 0!important;
}
main {
	max-width: 860px;
	min-width: 740px;
	flex: 1;
	transition: transform 0.3s ease;
}
main.main-w {
	max-width: 100%;
	min-width: auto;
	fex: initial;
	background: #ffffff;
	min-height: 100vh;
	margin: 0;
	padding: 70px 0 0;
    box-sizing: border-box;
}
.container {
	background: #ffffff;
	height: 100vh;
	min-height: 735px;
	margin: 0;
	padding: 70px 3% 0;
	box-sizing: border-box;
	border-left: 1px solid var(--border-color);
	border-right: 1px solid var(--border-color);
	position: relative;
}
aside {
	flex: 1;
	max-width: 340px;
	height: 100vh;
	min-height: 735px;
	margin: 0;
	padding-top: 70px;
	box-sizing: border-box;
	background-color: #fff;
    color: var(--text-color);
	transition: transform 0.3s ease;
}


@media screen and (max-width: 767px) {
	body {
		min-height: 100svh;
	}
	header {
		height: 40px;
		padding: 0.5em 1em;
	}
	.wrapper {
		display: inherit;
		width: 100%;
		margin: 40px auto 0;
		padding: 0;
	}
	main {
		max-width: 100%;
		min-width: 100%;
		margin: 0;
	}
	main.main-w {
		height: auto;
		min-height: auto;
		padding: 0 5% 2px;
	}
	.container {
		height: auto;
		min-height: auto;
		border: none;
		padding: 0 5% 2px; 
	}
	aside {
		height: auto;
	}
	/*オーバーレイ*/
	.overlay {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		max-width: 100%;
		height: 100dvh;
		background-color: transparent;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.25s ease, visibility 0s linear 0.25s;
		z-index: 1000;
	}
	/* オーバーレイ表示時 */
	.overlay.is-open {
		opacity: 1;
		visibility: visible;
		transition-delay: 0s;
	}
	/* ボトムシート本体 */
	.bottom-sheet {
		position: fixed;
		bottom: var(--sheet-viewport-bottom, 0px);
		left: 0;
		width: 100%;
		max-width: 100%;
		height: min(24dvh, 220px);
		max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px);
		padding: 0;
		background: var(--bg-color);
		border-radius: 40px 40px 0 0;
		transform: translateY(100%);
		transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
		display: block;
		z-index: 1000;
		box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
		will-change: transform;
		pointer-events: auto;
		overflow: hidden;
	}
	/* ボトムシート表示時 */
	.bottom-sheet.is-open {
		transform: translateY(0);
	}
	.bottom-sheet.is-dragging {
		transition: none;
		user-select: none;
	}
	/* ハンドルバー */
	.aside-header {
		padding: 10px 5% 0px;
		margin: 0 auto;
		width: 100%;
		height: 54px;
		box-sizing: border-box;
		text-align: center;
		position: relative;
		cursor: ns-resize;
		touch-action: none;
	}
	.aside-handle {
		width: 60px;
		height: 4px;
		margin: 0 auto;
		background: var(--bg-color4);
		border-radius: 2px;
	}
	.aside-tabs {
		background: rgba(255,0,0,1);
		display: inherit;
		padding: 0 0 0;
		font-size: 1em;
	}
	.aside-tabs button {
		display: none!important;
	}
	.bottom-sheet-title {
		display: inline-block;
		text-align: center;
		margin: 12px auto 0;
		font-size: 0.9rem;
		font-weight: 600;
		line-height: 1.6;
		padding: 0.15em 1.7em 0 3.2em;
		background-color: var(--bg-color);
		background-repeat: no-repeat;
		background-position: center left 1.3em;
		background-size: 1.6em auto;
	}
	.bottom-sheet-title.log-title {
		background-image: url("../img/icon_info.svg");
	}
	.bottom-sheet-title.ai-title {
		background-image: url("../img/icon_ai.svg");
	}
	#close-btn {
		position: absolute;
		top: 17px;
		right: 20px;
		width: 32px;
		height: 32px;
		border-radius: 50%;
		box-sizing: border-box;
		border: 0;
		cursor: pointer;
		touch-action: manipulation;
		background: var(--bg-color4) url("../img/icon_close.svg") no-repeat center center / 14px auto;
	}
	#close-btn:focus-visible {
		outline: 2px solid var(--text-color);
		outline-offset: 2px;
	}
	#log-box-wrap {
		position: absolute;
		top: 54px;
		right: 0;
		bottom: 0;
		left: 0;
		height: auto !important;
		min-height: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
}

@media (prefers-reduced-motion: reduce) {
	.overlay,
	.bottom-sheet {
		transition-duration: 0.01ms;
	}
}

header h1 {
	font-size: 1.3rem;
	line-height: 1;
	color: #777;
	margin: 0;
	padding: 1em 0;
	letter-spacing: 0.15em;
}

@media screen and (max-width: 767px) {
	header h1 {
		font-size: 1.1rem;
		font-weight: 500;
		padding: 0.3em 0;
	}
}

.btn {
	height: auto;
	line-height: 1.4;
	background-color: var(--bg-color2);
	border: 1px solid var(--border-color);
	color: var(--text-color);
	padding: 0.5em 1em 0.4em;
	font-size: 0.85rem;
	border-radius: 4px;
	cursor: pointer;
}
.btn:hover {
	background-color: #fff;
	transition: all 0.3s ease;
	border: 1px solid var(--text-color3);
	box-shadow: 0 0 0.3em rgba(0, 0, 0, 0.05);
}
/* 卦枠より上の操作領域。スマホは18penの既存の高さ・余白の合計を維持。 */
:root {
    --divination-operation-height: calc(11.5em + 0.875rem);
}
@media (max-width: 767px) {
    :root {
        --divination-operation-height: calc(6.44rem + 0.875rem + 0.7em);
    }
}
.divination-operation-area {
    display: flow-root;
    height: var(--divination-operation-height);
}

.hexagram-wrap {
    --hexagram-panel-height: 23.5em;
    --hexagram-frame-height: calc(23.5em + 0.8em + 12px);
	display: flex;
	justify-content: space-between;
	border-radius: 4px;
	padding: 5px 5px;
	margin: 0;
	border: 1px solid var(--border-color);
	box-sizing: border-box;
	background-color: var(--bg-color2);
	scroll-margin-top: 52px;
}
#hexagram,
#sub-gua {
	background-color: #fff;
	width: calc((100% - 20px) / 2);
	position: relative;
	margin: 0.4em auto;
	box-sizing: border-box;
	text-align: center;
}
.sub-gua-wrap {
    position: relative;
    overflow: hidden;
}
#sub-gua-body {
    display: flex;
    width: 400%;
    transition: transform 0.3s ease;
}
.sub-panel {
    position: relative;
    flex: 0 0 25%;
    width: 25%;
    box-sizing: border-box;
}
#hexagram,
.sub-panel {
	display: flex;
	flex-direction:column;
	justify-content: flex-start;
	align-items: flex-start;
	box-sizing: border-box;
	padding: 0 0 0.5em;
}
#hexagram,
#sub-gua,
.sub-panel {
	height: var(--hexagram-panel-height, 23.5em);
}

@media screen and (max-width: 767px) {
	.hexagram-wrap {
        --hexagram-panel-height: 15.5rem; /* 25em × 0.62rem */
        --hexagram-frame-height: calc(31rem + 41px);
		display: block;
		padding: 6px 6px;
		margin-bottom: 3.9em; /*btn-box高さ分*/
		border: none;
		background-color: var(--bg-color);
		border-radius: 26px;
	}
	#hexagram,
	#sub-gua {
		width: calc(100% - 12px);
		padding-top: 2.5em;
		border-radius: 20px;
		font-size: 0.62rem;
	}
	#hexagram {
		margin: 5px 6px 12px;
		padding: 0 0 0.5em;
	}
	#sub-gua {
		margin: 6px 6px 6px;
		min-height: auto;
	}
	.sub-panel {
		margin: 0;
		padding: 0 0 0.5em;
		overflow: hidden;
		opacity: 1;
		transform: translateX(0);
	}
	#hexagram,
	#sub-gua {
		height: var(--hexagram-panel-height, 25em);
	}
	.sub-gua-wrap,
	.sub-panel {
		height: 22.8em;
	}
	/*
	.slide-out-left {
		transform:translateX(-100px)!important;
	}
	.slide-out-right {
		transform:translateX(100px)!important;
	}
	.slide-in-right {
		transform: translateX(100px);!important;
	}
	.slide-in-left {
		transform: translateX(-100px);!important;
	}
	*/
}

/* is-pc */
@media screen and (min-width: 768px) {
    .hexagram-wrap {
        --hexagram-frame-height: calc(23.5em + 22px);
        padding: 10px;
        gap: 10px;
    }
    .hexagram-wrap > #hexagram,
    .hexagram-wrap > #sub-gua {
        width: calc((100% - 10px) / 2);
        margin: 0;
    }
	.gua-prefix,
	.gua-tabs {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		border-bottom: 1px solid var(--border-color);
	}
	.gua-tabs {
		display: flex;
		justify-content: center;
		z-index: 2;
		/*border-bottom: 1px solid var(--border-color);*/
		
	}
	.gua-prefix,
	.gua-tabs button {
		text-align: center;
		font-size: 1em;
		letter-spacing: 0.3em;
		text-indent: 0.3em;
		height: 2.3em;
		line-height: 2.3em;
	}
	.gua-tabs button {
		display: inline-block;
		flex: 1;
		background: none;
		cursor: pointer;
		color: var(--text-color);
		margin: 0;
		box-sizing: border-box;
		/*border-bottom: 1px solid var(--border-color);*/
		transition: all 0.3s ease;
		pointer-events: auto;
		opacity: 0.3;
	}
	.gua-tabs button.active {
		color: var(--text-color);
		background: #fff;
		cursor: default;
		position: relative;
		opacity: 1;
	}
	.gua-tabs button.active::after {
		position: absolute;
		bottom: -1px;
		left: 0;
		right: 0;
		display: block;
		content: "";
		width: 100%;
		height: 4px;
		background: var(--text-color);
		transition: all 0.3s ease;
	}
	.gua-tabs button:hover {
		color: var(--text-color);
		transition: all 0.3s ease; 
	}
}

/* is-sp */
@media screen and (max-width: 767px) {
	.gua-prefix-wrap {
		text-align: left;
	}
	.gua-prefix-wrap,
	.gua-tabs {
		position: absolute;
		top: 0.3em;
		left: 0;
		right: 0;
		margin: 0 0.3em 0;
		height: 2.2em;
		box-sizing: content-box;
		font-size: 0.9rem;
		line-height: 1em;
		font-weight: 500;
		background-color: transparent;
	}
	.gua-tabs {
		display: flex;
		justify-content: space-between;
		z-index: 2;
	}
	.gua-prefix,
	.gua-tabs button {
		display: inline-block;
		text-align: center;
		letter-spacing: 0.1em;
		text-indent: 0.1em;
		width: calc(25% - 0.3em);
		border-radius: 1.1em;
		box-sizing: border-box;
}
	.gua-prefix {
		padding: 0.6em 0 0.6em;
	}
	.gua-tabs button {
		padding: 0.6em 0 0.6em;
		color: #fff;
		pointer-events: auto;
	}
	.gua-prefix,
	.gua-tabs button.active {
		background-color: var(--text-color);
		color: #fff!important;
		border: none;
		/*all:unset;*/
	}
	.gua-tabs button:not(.active) {
		background: #fff;
		color: var(--text-color2);
		box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
		border: none;
	}
	.gua-tabs button:hover {
		color: var(--text-color);
		transition: all 0.3s ease; 
	}
}

.gua-prefix > .gua-tab-label,
.gua-tabs button > .gua-tab-label {
    display: inline-block;
    transform: scale(0.9);
    transform-origin: center;
}

.gua-name {
	width: 90%;
	max-width: 24em;
	height: 8.8em;
	overflow: hidden;
	text-align: center;
	font-weight: normal;
	margin: 0 auto;
	padding-top: 0em;
	vertical-align: middle;
	position: relative;
	opacity: 1;
}
.gua-name > span:nth-child(1) {
	display: inline-block;
	width: 2.5em;
	font-size: 1.35em;
	line-height: 1;
	margin: 3.0em auto 0 0;
}
.gua-name > span:nth-child(2) {
	display: inline-block;
	font-size: 2.5em;
	font-weight: 200;
	line-height: 1;
	letter-spacing: 0.07em;
	text-indent: 0.07em;
	transform: translateY(0.2em);
	padding-right: 1.35em;
}
.gua-name > span:nth-child(2) > span {
	color: var(--color-red);
}
.gua-name > span:nth-child(3) {
	display: block;
	font-size: 0.8em;
	transform: translateY(0.8em);
	font-weight: 500;
	line-height: 1;
}
#hexagram .gua-name {
	opacity: 1;
}
#sub-gua .gua-name {
	animation-delay: 0s;
	opacity: 0.7;
}

@media screen and (max-width: 767px) {
	.gua-name {
		margin-top: 1em;
		height: 7.75em;
	}
	#sub-gua .gua-name {
		margin-top: -1.5em;
	}
	.gua-name > span:nth-child(1) {
		font-weight: 500;
	}
	.gua-name > span:nth-child(2) {
		font-weight: 400;
	}
}

.lines-stack {
	display: flex;
	flex-direction: column-reverse;
	justify-content: center;
	width: 90%;
	height: 16.625em;
	margin: 0em 5% 0em;
	padding: auto 0 0;
	box-sizing: border-box;
}
.line-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 2.35em;
	width: 100%;
	max-width: 36em;
	margin: 0 auto;
	padding: 0.5em auto 0.5em;
	box-sizing: border-box;
}
.line-wrapper:nth-child(4) {
	margin: 0 auto 0.9em;
}
.line-wrapper.fade-in-box {
	animation: fadeIn 0.9s ease-out forwards;
}
.line {
	display: flex;
	justify-content: space-between;
	width: 7.5em; /*120px*/ /*40%*/
	height: 1.3em;
	margin: 0 3% 0;
	box-sizing: border-box;
}
.line.yang .segment {
	background-color: var(--text-color);
	width: 100%;
}
.line.yin .segment {
	background-color: var(--text-color);
	width: 43%;
}
.line-label {
	display: inline-block;
	flex: 1;
	box-sizing: border-box;
	text-align: left;
	font-size: 0.8em;
	color: #a2a2a2;
}
.line-number {
	display: inline-block;
	flex: 1;
	box-sizing: border-box;
	text-align: left;
	font-size: 1.0em;
	line-height: 1.5em;
	color: #aaa;
}
.line-number span:nth-child(1) {
	margin-right: 0.3em;
	display: inline-block;
	width: 1.5em;
	height: 1.5em;
	line-height: 1.5em;
	border-radius: 50%;
	text-align: center;
}
.line-number span:nth-child(2) {
	display: inline-block;
	font-size: 0.8em;
	width: calc(100% - 2.5em);
	text-align: right;
	position: relative;
}
.line-number span:nth-child(2):before {
	position: absolute;
	top: 0.65em;
	left: 0.2em;
	content: "";
	display: block;
	width: calc(100% - 2.8em);
	height: 2px;
	border-bottom: 1px dashed var(--text-color2);
}
.line-number.moving-num span:nth-child(1) {
	background: #666;
	color: white;
}

@media screen and (max-width: 767px) {
	.lines-stack {
		height: 15.625em;
		margin: 0em auto 0em;
		max-width: 24em;
	}
	.line-wrapper {
		opacity:1 !important;
	}
	.line-label {
		flex: 1;
		font-size: 1.1em;
		color: var(--text-color);
	}
	.line-number {
		flex: 1;
		color: var(--text-color);
		font-size: 1.2em;
	}
	.line-number span:nth-child(2) {
		font-size: 1.0em;
		width: calc(100% - 1.8em);
		margin-bottom: -0.2em;
	}
	.line-number span:nth-child(2):before {
		top: 0.55em;
	}
	.line-number.moving-num span:nth-child(1) {
		background: var(--text-color);
	}
}

.hakke-label {
	position: absolute;
	bottom: 1em;
	left: 50%;
	margin-left: -34%;
    transform: translateX(-0.3em);
	width: 2.5em;
	text-align: left;
	font-weight: 400;
	color: var(--text-color);
}
#sub-gua .hakke-label {
	opacity: 0.7;
}
.hakke-label div {
	width: 100%;
	height: 6.05em;
	border-right: 1px solid var(--text-color3);
	position: relative;
	overflow: visible;
	box-sizing: border-box;
}
.hakke-label div:nth-child(1) {
	margin: 0 0 0;
}
.hakke-label div:nth-child(2) {
	margin: 1.9em 0 0;
	/*margin: 1.3em 0 0;*/
}
.hakke-label div > span:nth-child(1) {
	visibility: hidden;
}
.hakke-label div > span:nth-child(2) {
	display: block;
	position: absolute;
	top: 0px;
	right: 0.3em;
	width: 1.5em;
	height: 1.5em;
	line-height: 1.5em;
	border: 1px solid var(--border-color);
	font-size: 0.96em;
	border-radius: 0.1em;
	text-align: center;
	box-sizing: border-box;
}
.hakke-label div > span:nth-child(3) {
	display: block;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0.4em;
	/*height: 6.05em;*/
	width: 1.5em;
	line-height: 6.05em;
	transform: translateY(-0.5em);
	font-size: 1.2em;
	text-align: center;
}

@media screen and (max-width: 767px) {
	.hakke-label {
		bottom: 1.5em;
		left: 50%;
		margin-left: -7.6em; /*-29%*/
		width: 2.5em;
		text-align: center;
	}
	#sub-gua .hakke-label {
		bottom: 1.8em;
	}
	.hakke-label div>span:nth-child(2) {
		right: 0.3em;
		font-size: 1.4em; /*0.96em*/
		transform: translateY(-0.3em);
	}
	.hakke-label div>span:nth-child(3) {
		top: 50%;
		right: 0.3em;
		height: 6.3em;
		width: 2.0em;
		line-height: 1;
		transform: translateY(-0.5em) translateX(-0.93em);
		font-size: 2.0em; /*1.2em*/
		text-align: center;
	}
}

.sub-panel .line-wrapper,
.sub-panel .hakke-label div  {
	animation:none !important;
	opacity:1 !important;
	/*animation: fadeIn 0.3s ease-out forwards;*/
	/*animation-delay: 0.1s;*/
	/*opacity: 0;*/
}
.sub-panel .gua-name {
	animation-delay: 0.2s;
	opacity: 1;
}
.sub-panel .line.yang .segment {
	background-color: #ccc;
	width: 100%;
}
.sub-panel .line.yin .segment {
	background-color: #ccc;
	width: 43%;
}
.sub-panel .line-label {
	visibility: hidden;
}
.sub-panel .line-number span {
	visibility: hidden;
}
.sub-panel .line-number.origin-label {
	visibility: visible;
	color: #aaa;
	white-space: nowrap;
	padding-left: 0.5em;
}

@media (min-width: 769px){
	.sub-panel .line-number.origin-label {
		font-size: 0.8em;
	}
    :is(#panel-shika, #panel-sakka, #input-panel-shika, #input-panel-sakka) .line-number.origin-label {
        font-size: 1.04em;
    }
}

@media (max-width: 768px){
	.sub-panel .line-number.origin-label {
		font-size: 1.1em;
	}
    :is(#panel-shika, #panel-sakka, #input-panel-shika, #input-panel-sakka) .line-number.origin-label {
        font-size: 1.43em;
    }
}

.sub-gua-wrap .arrow {
	position: absolute;
	top: 0;
	width: 40px;
	height: 100%;
	background-color: transparent;
	background-image: url("../img/icon_arrow.svg");
	background-repeat: no-repeat;
	/*background-position: center center;*/
	background-size: 2.2em 2.2em;
	border: none;
	opacity: 0.5;
	z-index: 9;
	transition: opacity 0.3s ease;
}
.sub-gua-wrap:not(.is-ready) .arrow {
	visibility: hidden;
	pointer-events: none;
}
.sub-gua-wrap .arrow.disabled {
	opacity: 0.1;
	pointer-events: none;
}
.sub-gua-wrap .arrow.prev {
	left: 0;
	transform: rotate(180deg);
}
.sub-gua-wrap .arrow.next {
	right: 0;
}
.sub-panel .shika_no {
	width: 100%;
	text-align: center;
	font-size: 2.2em;
	font-weight: 200;
	margin: auto 0;
	letter-spacing: 0.07em;
	text-indent: 0.07em;
	transform: translateY(0.6em);
	opacity: 0.6;
}
.slide-out-left {
	transform:translateX(-100px)!important;
}
.slide-out-right {
	transform:translateX(100px)!important;
}
.slide-in-right {
	transform: translateX(100px)!important;
}
.slide-in-left {
	transform: translateX(-100px)!important;
}

@media (min-width: 769px){
	.sub-gua-wrap .arrow.prev {
		background-position: center 45%!important;
	}
	.sub-gua-wrap .arrow.next {
		background-position: center 55%!important;
	}
}

@media (max-width: 768px){
	.sub-panel .shika_no {
		transform: translateY(0.2em);
		font-weight: 400;
	}
	.sub-gua-wrap .arrow {
		background-size: 2.2em 2.2em;
	}
	.sub-gua-wrap .arrow.prev {
		background-position: center center;
	}
	.sub-gua-wrap .arrow.next {
		background-position: center center;
	}
}

/*アニメーション*/
@media (min-width: 769px){
	.fade-in-box {
	  /*animation: fadeIn 0.3s ease-out forwards;*/
	  animation:none!important;
	}
	.fade-up-box {
	  /*animation: fadeUp 0.3s ease-out forwards;*/
	  animation:none!important;
	}
}

@media (max-width: 768px){
	.fade-in-box{
		animation:none!important;
	}
.fade-up-box{
		animation:none!important;
	}
}
/*
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
100% {
    opacity: 1;
  }
}
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(0.2em);
  }
100% {
    opacity: 1;
    transform: translateY(0);
  }
}
*/

/* is-pc */
@media screen and (min-width: 768px) {
	.btn-box {
		text-align: center;
		position: inherit;
		margin: 1em auto 1em;
		z-index: 100;
		/*background: rgba(255,0,0,0.3);*/
	}
	.ai-btn {
		display: block;
		margin: 0 auto;
		padding: 0.2em 1.7em 0.1em 3.2em;
		border: 1px solid var(--border-color);
		box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
		font-size: 0.8em;
		line-height: 2;
		border-radius: 0.6em;
		box-sizing: border-box;
		text-align: center;
		color: var(--text-color);
		background-image: url("../img/icon_ai.svg");
		background-color: #fff;
		background-repeat: no-repeat;
		background-position: center left 1.3em;
		background-size: 1.4em auto;
		z-index: 11;
		cursor: pointer;
		min-width: 11em;
	}
}

/* is-sp */
@media screen and (max-width: 767px) {
	.btn-box {
		position: fixed;
		top: var(--bottom-controls-top, auto);
		bottom: var(--bottom-controls-bottom, 0px);
		left: 0;
		right: 0;
		width: 100%;
		background: var(--bg-color);
		margin: 0;
		padding: 0.5em 3% 0.5em;
		text-align: center;
		box-sizing: border-box;
		display: flex;
		justify-content: center;
		gap: 3%;
		border-top: 1px solid var(--border-color);
		font-size: 0.9em;
		z-index: 1001;
	}
	.btn-box.is-hidden {
		display: none;
	}
	.log-btn,
	.ai-btn {
		display: block;
		padding: 0.8em 1em 0.8em 2.9em;
		background-color: rgba(255,255,255,0.9);
		box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
		font-size: 0.8em;
		line-height: 1;
		font-weight: 600!important;
		border-radius: 0.65em;
		box-sizing: border-box;
		text-align: center;
		color: var(--text-color);
		background-repeat: no-repeat;
		background-position: center left 1em;
		background-size: 1.4em auto;
		z-index: 11;
		cursor: pointer;
	}
	.log-btn {
		background-image: url("../img/icon_info.svg");
	}
	.ai-btn {
		background-image: url("../img/icon_ai.svg");
	}
}

/* is-pc */
@media screen and (min-width: 768px) {
	#bottom-sheet {
		display: grid;
		grid-template-rows: auto minmax(0, 1fr);
		height: calc(100vh - 70px);
		min-height: 0;
	}
	.aside-header {
		background: #fff;
	}
	.aside-tabs {
		display: flex;
		justify-content: space-between;
		align-items: flex-end;
		padding: 10px 0 0;
		font-size: 0.88em;
		border-bottom: 1px solid var(--border-color);
	}
	.aside-tabs button {
		display: block;
		flex: 1 1 50%;
		min-width: max-content;
		box-sizing: border-box;
		padding: 0.6em 0.7em;
		text-align: center;
		color: var(--text-color);
		opacity: 0.3;
	}
	.aside-tabs button.active {
		position: relative;
		opacity: 1;
	}
	.aside-tabs button.active::after {
		display: block;
		content: "";
		position: absolute;
		bottom: -1px;
		left: 0;
		right: 0;
		width: 100%;
		height: 4px;
		background: var(--text-color);
	}
	.aside-tabs button span {
		display: inline-block;
		white-space: nowrap;
		padding-left: 1.9em;
		background-repeat: no-repeat;
		background-position: center left;
		background-size: 1.4em auto;
	}
	.aside-tabs button:nth-child(1) span {
		background-image: url("../img/icon_info.svg");
	}
	.aside-tabs button:nth-child(2) span {
		background-image: url("../img/icon_ai.svg");
	}
}

/* log */
#log-box-wrap,
#ai-box-wrap {
	background: var(--bg-color2);
	height: calc(100vh - 70px);
	margin: 0 auto 0;
	box-sizing: border-box;
}
#log-box-wrap[hidden],
#ai-box-wrap[hidden] {
	display: none !important;
}
#log-box-wrap {
	font-size: 0.8rem;
	padding: 30px 2em 0;
	overflow-y: scroll;
	scroll-behavior: smooth !important;
}
aside #log-display .log-intro,
aside .input-help {
    color: #666;
}
#log-box-wrap:has(.history-item) {
    padding-left: 10px;
    padding-right: 10px;
}
#ai-box-wrap {
	font-size: 0.9em;
	padding: 100px 25px 0;
}
.log-box,
.sheet-box {
	width: 100%;
	margin: 0 auto;
	padding: 0 0 1.5em;
	line-height: 1.4;
	text-align: left;
	color: var(--text-color);
}
.ai-content {
	text-align: center;
}
.ai-content label,
.ai-content textarea {
	display: block;
	box-sizing: border-box;
	text-align: left;
}
.ai-content label {
	text-align: center;
}
.ai-content textarea {
	width: 100%;
	border: 1px solid #ddd;
	padding: 0.7em;
	margin: 0.5em 0 2em;
	min-height: 12em;
	border-radius: 0.3em;
}
.ai-content textarea::placeholder {
	color: var(--text-color3);
}
.ai-content button#copy-ai-prompt {
	display: inline-block;
	text-align: center!important;
	margin: 1em 1.5em;
	width: calc(100% - 3em);
	min-width: 0;
	color: var(--text-color);
	background: #fff;
	padding: 0.2em 1em 0.1em;
	border: 1px solid var(--border-color);
	box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
	font-size: 0.8em;
	line-height: 2;
	border-radius: 0.6em;
	box-sizing: border-box;
	cursor: pointer;
}
.ai-content .ai-prompt-help {
    margin: 0.5em 1.5em 0;
    font-size: 0.85em;
    line-height: 1.8;
    text-align: left;
    color: var(--text-color2);
}
.ai-content button span {
	background-image: url("../img/icon_copy.svg");
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: center left;
	background-size: 1.4em auto;
	padding-left: 1.9em;
}

@media screen and (max-width: 767px) {
	#log-box-wrap,
	#ai-box-wrap {
		background: var(--bg-color);
		margin: 0;
		min-height: 0 !important;
		font-size: 0.82rem;
        display: block;
		border-top: 1px solid #fff;
	}
	#log-box-wrap {
		padding: 10px 2em env(safe-area-inset-bottom);
		/*padding: 10px 10px calc(1.5em + env(safe-area-inset-bottom));*/
	}
	#ai-box-wrap {
		padding: 3em 20px calc(1.5em + env(safe-area-inset-bottom));
	}
	.log-box {
		padding-top: 0;
	}
}

/* PC版：ヘッダーを除く残りの高さを、表示中のパネルだけに割り当てる */
@media screen and (min-width: 768px) {
	#log-box-wrap,
	#ai-box-wrap {
		width: 100%;
		height: auto;
		min-height: 0;
		margin: 0;
		padding-bottom: 0;
		overflow-y: auto;
	}
}

@media screen and (min-width: 768px) {
	.is-sp {
		display: none;
	}
}
@media screen and (max-width: 767px) {
	.is-pc {
		display: none;
	}
}

/* margin */
.mt1em {margin-top: 1em !important;}
.mt2em {margin-top: 2em !important;}
.mt3em {margin-top: 3em !important;}
.mt4em {margin-top: 4em !important;}
.mt5em {margin-top: 5em !important;}

/* 全ページ共通のヘッダー・グローバルナビ。 */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}
.site-header h1 {
    flex-shrink: 0;
    padding: 0;
    letter-spacing: 0.05em;
}
@media (min-width: 768px) {
    .site-header h1 { font-size: 1.495rem; letter-spacing: 0.05em; }
}

.site-header .site-beta-label {
    display: inline-block;
    margin-left: 0.2em;
    font-size: 0.6em;
    font-weight: 400;
    letter-spacing: normal;
    vertical-align: baseline;
    white-space: nowrap;
}
.site-header-inner {
    display: contents;
}
@media screen and (min-width: 768px) {
    .site-header {
        padding-right: 0;
        padding-left: 0;
    }

    .site-header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1em;
        width: 100%;
        max-width: 1200px;
        height: 100%;
        margin: 0 auto;
        padding: 0 3%;
        box-sizing: border-box;
    }
}
.site-header h1 a {
    color: inherit;
    text-decoration: none;
}
.global-nav ul {
    display: flex;
    align-items: center;
    gap: clamp(0.6em, 1.5vw, 1.8em);
    font-size: 0.9rem;
	letter-spacing: 0.05em;
    white-space: nowrap;
}
@media screen and (min-width: 768px) {
    .global-nav,
    .global-nav ul,
    .global-nav li,
    .global-nav a {
        height: 100%;
    }
    .global-nav li {
        display: flex;
        align-items: center;
    }
}
.global-nav a,
.global-menu-drawer nav a {
    color: var(--text-color);
    text-decoration: none;
}
.global-nav a,
.global-nav [aria-disabled],
.global-menu-drawer nav a,
.global-menu-drawer nav [aria-disabled] {
    display: flex;
    align-items: center;
    gap: 0.35em;
}
.global-nav-icon {
    display: block;
    flex: 0 0 1.5em;
    width: 1.5em;
    height: 1.5em;
    margin-right: 0.3em;
    object-fit: contain;
}
.global-nav a[aria-current],
.global-menu-drawer a[aria-current] {
    color: var(--color-red);
}
.global-nav-icon-current {
    background-color: currentColor;
    -webkit-mask: var(--nav-icon) center / contain no-repeat;
    mask: var(--nav-icon) center / contain no-repeat;
}
@media (min-width: 768px) {
    .global-nav ul {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 0.8em;
    }
    .global-nav li > a,
    .global-nav li > .global-nav-pending { width: 100%; }
    .global-nav a,
    .global-nav .global-nav-pending-label {
        flex-direction: column;
        justify-content: center;
        gap: 0.25em;
        line-height: 1.2;
    }
    .global-nav .global-nav-icon { margin-right: 0; }
    .global-nav .global-nav-pending { height: 100%; justify-content: center; }
    .global-nav .global-nav-top-label { display: block; }
    .global-nav .global-nav-top .global-nav-icon { margin-right: 0; }
}
.global-nav [aria-disabled],
.global-menu-drawer [aria-disabled] {
    color: var(--text-color2);
    opacity: 0.5;
}
.global-menu-toggle {
    display: none;
}
.global-nav-pending {
    position: relative;
    cursor: default;
}
.global-nav .global-nav-pending,
.global-menu-drawer .global-nav-pending {
    opacity: 1;
}
.global-nav-pending-label {
    display: flex;
    align-items: center;
    gap: 0.35em;
    opacity: 0.5;
}
.global-nav-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 0.4em 0.7em;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    color: var(--text-color);
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: nowrap;
    visibility: hidden;
    pointer-events: none;
}
.global-nav-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    background: #fff;
    transform: translateX(-50%) rotate(45deg);
}
@media (min-width: 768px) {
    .global-nav .global-nav-tooltip { top: calc(100% - 0.8em); }
}
.global-nav-pending:hover .global-nav-tooltip,
.global-nav-pending:focus .global-nav-tooltip {
    visibility: visible;
}
.global-menu-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    margin: 0;
    width: min(70vw, 300px);
    max-width: none;
    height: 100dvh;
    max-height: none;
    padding: 12px 20px 24px;
    box-sizing: border-box;
    border: 0;
    background: #fff;
    color: var(--text-color);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 220ms ease;
}
.global-menu-drawer.is-open {
    transform: translateX(0);
}
.global-menu-drawer::backdrop {
    background: rgb(0 0 0 / 35%);
}
.global-menu-close {
    display: block;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 2rem;
    cursor: pointer;
}
.global-menu-drawer nav a,
.global-menu-drawer nav [aria-disabled] {
    display: flex;
    padding: 1em 0.5em;
    border-bottom: 1px solid var(--border-color);
}
html.global-menu-open {
    overflow: hidden;
}
@media screen and (min-width: 768px) and (max-width: 960px) {
    .site-header h1 {
        font-size: 1.15rem;
        letter-spacing: 0.05em;
    }
    .global-nav ul {
        font-size: 0.8rem;
    }
}
@media screen and (max-width: 767px) {
    .global-menu-drawer .global-nav-tooltip {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        flex-shrink: 0;
        margin-left: 6px;
    }
    .global-menu-drawer .global-nav-tooltip::before {
        top: 50%;
        left: -5px;
        transform: translateY(-50%) rotate(-45deg);
    }
    .site-header {
        justify-content: flex-start;
        gap: 0.6em;
        padding: 0 1em 0 0.4em;
    }
    .site-header h1 {
        padding: 0;
    }
    .global-nav {
        display: none;
    }
    .global-menu-toggle {
        display: flex;
        flex: 0 0 40px;
        height: 40px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--text-color);
        cursor: pointer;
    }
    .global-menu-toggle span {
        width: 21px;
        height: 2px;
        background: currentColor;
    }
}
@media (prefers-reduced-motion: reduce) {
    .global-menu-drawer {
        transition: none;
    }
}

/* 卦の結果表示に共通のリンク装飾とサブ卦の中央配置。 */
/* 占って確定した卦名から、各卦の解説へ移動する。 */
.gua-name > .gua-detail-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-decoration: none;
}

.gua-name:has(> .gua-detail-link) > span:nth-child(2)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.65em;
    width: 0.5em;
    height: 0.5em;
    transform: translateY(-50%);
    background: url("../img/icon_arrow_src.svg") no-repeat center / contain;
}

.gua-name:has(> .gua-detail-link) > span {
    transition: opacity 0.3s ease;
}

.gua-name:has(> .gua-detail-link:hover) > span,
.gua-name:has(> .gua-detail-link:focus-visible) > span {
    opacity: 0.5;
}

@media screen and (max-width: 767px) {
    .gua-name:has(> .gua-detail-link) > span:nth-child(2)::after {
        right: 0.35em;
        width: 0.75em;
        height: 0.75em;
    }
}

/* サブ卦の爻の中心を、卦名・パネルの中心に揃える。 */
.sub-panel .lines-stack {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
}

.sub-panel .line-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5em minmax(0, 1fr);
    column-gap: 3%;
}

.sub-panel .line {
    margin-left: 0;
    margin-right: 0;
}

.sub-panel .line-label,
.sub-panel .line-number {
    min-width: 0;
}

/* リセット・入力修正に共通のボタン。 */
@media screen and (min-width: 768px) {
    .container > .hexagram-wrap {
        position: relative;
    }

    .container > .hexagram-wrap > .reset-btn-wrap {
        top: auto;
        bottom: 100%;
        right: 0;
        margin: 0 0 0.5em;
        z-index: 1;
    }
}

.reset-btn-wrap {
	position: absolute;
	top: 4rem;
	right: 0;
	margin: 0.8em 0.8em 0 0;
	font-size: 0.85em;
}
.reset-btn {
	border: none;
	background-color: var(--bg-color2);
	background-image: url("../img/icon_reset.svg");
	background-repeat: no-repeat;
	background-position: center left 0.6em;
	background-size: 1.8em 1.8em;
	padding: 0.8em 1.2em 0.6em 2.6em;
	border-radius: 1.8em;
	cursor: pointer;
	box-sizing: border-box;
	color: var(--text-color);
}
.reset-btn:hover {
	background-color: var(--bg-color);
	box-shadow: 0 0 3px 0 var(--bg-color);
	opacity: 0.7;
	transition: all 0.3s ease;
}

@media screen and (max-width: 767px) {
	.reset-btn-wrap {
		position: fixed;
		top: 128px;
		right: 0;
		margin: 2.8em 1.4em 0 0;
		font-size: 0.7rem;
		z-index: 1000;
	}
	.reset-btn {
		background-color: var(--bg-color2);
		background-position: top 1.0em center;
		background-size: 2.2em 2.2em;
		padding: 3.0em 0 0;
		border-radius: 1.5em;
		text-align: center;
		font-weight: 500;
		width: 5em;
		height: 5em;
		box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
	}
}


/* PCの八卦名と自然の象を、同じ中心軸に揃える。 */
@media screen and (min-width: 768px) {
    .hakke-label div > span:nth-child(2) {
        display: flex;
        align-items: center;
        justify-content: center;
        top: 0;
        left: 50%;
        right: auto;
        width: 1.5em;
        height: 1.5em;
        padding: 0;
        line-height: 1;
        box-sizing: border-box;
        transform: translateX(-50%);
    }
    .hakke-label div > span:nth-child(3) {
        top: 50%;
        bottom: auto;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        line-height: 1;
        text-align: center;
        transform: translateY(-50%);
    }
}

/* 枠付きの八卦名は、各3爻の下端に配置する。 */
.hakke-label div > span:nth-child(2) {
    top: auto;
    bottom: 0;
}
@media screen and (max-width: 767px) {
    .hakke-label div > span:nth-child(2) {
        transform: translateY(0.3em);
    }
}

/* 八卦名の枠と右の縦線との間を4px確保する。 */
.hakke-label div > span:nth-child(2) {
    left: auto;
    right: 4px;
    transform: none;
}
.hakke-label div > span:nth-child(3) {
    translate: -3px 0;
}
@media screen and (max-width: 767px) {
    .hakke-label div > span:nth-child(2) {
        transform: translateY(0.3em);
    }
}

/* PCでは卦名の正方形と自然の象を、4px間隔の同じ中心軸に揃える。 */
@media (min-width: 768px) {
    .hakke-label div > span:nth-child(3) {
        left: auto;
        right: calc(4px + 0.6em);
        width: auto;
        translate: none;
        transform: translate(50%, -50%);
    }
}

/* 八卦ラベルは共通の内容領域で中央揃え。字体サイズで横位置を計算しない。 */
.hakke-label div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    padding: 0 4px 0 0;
    text-align: center;
}
.hakke-label div > span:nth-child(1) {
    display: none;
}
.hakke-label div > span:nth-child(2),
.hakke-label div > span:nth-child(3) {
    position: static;
    inset: auto;
    grid-area: 1 / 1;
    justify-self: center;
    margin: 0;
    padding: 0;
    text-align: center;
    translate: none;
    transform: none;
}
.hakke-label div > span:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: end;
    width: 1.5em;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    line-height: 1;
    box-sizing: border-box;
}
.hakke-label div > span:nth-child(3) {
    align-self: center;
    width: 100%;
    height: auto;
    line-height: 1;
}
@media (max-width: 767px) {
    .hakke-label div > span:nth-child(2) {
        transform: translateY(0.3em);
    }
}
