/* ロアジエール お手紙オプション */

/* ---------- 便箋（A4。96dpiで 794×1123。印刷のページと同じ形） ----------
 * 用紙はいつも白。模様は SVG、罫線は線（border）で描くので、
 * 印刷の「背景のグラフィック」を入れなくても、線や模様が抜けずに印刷される。
 */
.rjl-sheet {
	--fs: 22px;
	--lh: 1.95;
	--line: calc(var(--fs) * var(--lh));
	--pt: 112px; /* 文字の場所：上下のあき */
	--pl: 100px; /* 文字の場所：左右のあき */
	--rule: #c9c3b9;
	position: relative;
	width: 794px;
	height: 1123px;
	box-sizing: border-box;
	padding: var(--pt) var(--pl);
	background: #fff;
	color: #2b2723;
	font-family: var(--rjl-font), 'Klee One', serif;
	font-size: var(--fs);
	line-height: var(--lh);
	font-weight: 400;
	letter-spacing: .02em;
	overflow: hidden;
	text-align: left;
}
.rjl-size-s { --fs: 18px; }
.rjl-size-m { --fs: 22px; }
.rjl-size-l { --fs: 28px; }

/* 模様 */
.rjl-deco { position: absolute; inset: 0; pointer-events: none; }
.rjl-deco svg { display: block; width: 100%; height: 100%; }

/* 罫線（横書きは横の線、縦書きはたての線）。文字の行とぴったり同じ間かく。 */
.rjl-rules {
	position: absolute;
	top: var(--pt);
	bottom: var(--pt);
	left: var(--pl);
	right: var(--pl);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	pointer-events: none;
}
.rjl-rules i {
	flex: none;
	display: block;
	height: var(--line);
	box-sizing: border-box;
	border-bottom: 1px solid var(--rule);
}
.rjl-dir-tate .rjl-rules { flex-direction: row-reverse; }
.rjl-dir-tate .rjl-rules i {
	height: auto;
	width: var(--line);
	border-bottom: 0;
	border-left: 1px solid var(--rule);
}
.rjl-rule-off .rjl-rules { display: none; }
.rjl-deco-wa { --rule: #b9c4d6; }
.rjl-deco-modern { --rule: #c3c8d1; }
.rjl-deco-simple { --rule: #cbc4b8; }
.rjl-deco-pop { --rule: #f5b3c5; }

.rjl-body {
	position: relative;
	width: 100%;
	height: 100%;
	white-space: pre-wrap;
	word-break: break-all;
	overflow-wrap: anywhere;
	overflow: hidden;
}
.rjl-dir-tate .rjl-body {
	writing-mode: vertical-rl;
	-webkit-writing-mode: vertical-rl;
	text-orientation: mixed;
}

/* ---------- お買い物カゴの「お手紙を付ける」 ---------- */
.rjl-box {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 18px 0;
	padding: 16px 18px;
	border: 2px dashed #d6c39e;
	border-radius: 14px;
	background: #fffaf0;
	color: #3d3123;
}
.rjl-box__icon { flex: none; width: 56px; height: 56px; }
.rjl-box__icon img { width: 100%; height: 100%; display: block; }
.rjl-box__txt { flex: 1; min-width: 0; line-height: 1.6; }
.rjl-box__txt b { display: block; font-size: 17px; margin-bottom: 2px; }
.rjl-box__txt span { display: block; font-size: 13px; color: #6b5f4f; }
.rjl-open {
	flex: none;
	border: 0;
	border-radius: 999px;
	padding: 12px 18px;
	font-size: 15px;
	font-weight: 700;
	background: #8a6d3b;
	color: #fff;
	cursor: pointer;
	white-space: nowrap;
}
.rjl-open:hover { background: #735a30; }
@media (max-width: 600px) {
	.rjl-box { flex-wrap: wrap; }
	.rjl-box__icon { width: 44px; height: 44px; }
	.rjl-open { width: 100%; }
}

/* ---------- お手紙を書く画面 ---------- */
.rjl-modal {
	position: fixed;
	inset: 0;
	z-index: 9999999;
	background: rgba(30, 24, 16, .55);
	display: flex;
	align-items: stretch;
	justify-content: center;
}
.rjl-modal[hidden] { display: none; }
.rjl-modal__in {
	position: relative;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	background: #fffdf8;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
@media (min-width: 900px) {
	.rjl-modal { padding: 24px; }
	.rjl-modal__in { border-radius: 16px; }
}
.rjl-head {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-bottom: 1px solid #eadfcb;
	background: #fffaf0;
}
.rjl-head b { font-size: 17px; color: #3d3123; }
.rjl-x {
	border: 0;
	background: transparent;
	font-size: 15px;
	color: #6b5f4f;
	cursor: pointer;
	padding: 6px 8px;
}
.rjl-wrap {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	display: grid;
	grid-template-columns: 1fr;
}
@media (min-width: 900px) {
	.rjl-wrap { grid-template-columns: minmax(0, 46%) minmax(0, 1fr); overflow: hidden; }
	.rjl-preview { overflow-y: auto; }
	.rjl-ctrl { overflow-y: auto; }
}
.rjl-preview {
	padding: 14px;
	background: #efe9de;
}
.rjl-scaler { position: relative; margin: 0 auto; }
.rjl-scaler .rjl-sheet {
	position: absolute;
	top: 0;
	left: 0;
	transform-origin: top left;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
}
.rjl-warn-sheet {
	margin: 10px 0 0;
	color: #b5452f;
	font-weight: 700;
	font-size: 14px;
	text-align: center;
}
.rjl-ctrl { padding: 14px 16px 24px; color: #3d3123; }
.rjl-label { font-weight: 700; margin: 14px 0 6px; font-size: 15px; }
.rjl-label:first-child { margin-top: 0; }
.rjl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rjl-chip {
	border: 2px solid #d9cfbf;
	border-radius: 12px;
	background: #fff;
	color: #3d3123;
	padding: 6px 12px;
	font-size: 14px;
	cursor: pointer;
	line-height: 1.4;
}
.rjl-chip[aria-pressed="true"] { border-color: #8a6d3b; background: #f7efe0; box-shadow: 0 0 0 2px rgba(138, 109, 59, .15); }
.rjl-chip--font { min-width: 92px; text-align: center; }
.rjl-chip--font .rjl-chip__sample { display: block; font-size: 19px; }
.rjl-chip--font .rjl-chip__name { display: block; font-size: 11px; color: #6b5f4f; font-family: sans-serif; }
.rjl-chip--deco { min-width: 72px; text-align: center; padding: 6px 8px; }
.rjl-chip--deco .rjl-thumb { display: block; width: 56px; height: 79px; margin: 0 auto 3px; background: #fff; border: 1px solid #ddd5c7; border-radius: 3px; overflow: hidden; }
.rjl-chip--deco .rjl-thumb svg { display: block; width: 100%; height: 100%; }
/* 小さな見本でも模様の線が見えるように、線の太さを画面の1pxにそろえる */
.rjl-chip--deco .rjl-thumb svg * { vector-effect: non-scaling-stroke; stroke-width: 1px; }
.rjl-chip--deco .rjl-thumb svg [stroke-dasharray] { stroke-dasharray: 0 3; stroke-width: 2px; }
.rjl-chip--deco .rjl-chip__name { display: block; font-size: 12px; }
.rjl-text {
	width: 100%;
	box-sizing: border-box;
	min-height: 180px;
	border: 2px solid #d9cfbf;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 16px;
	line-height: 1.7;
	background: #fff;
	color: #2b2723;
	resize: vertical;
}
.rjl-text:focus { border-color: #8a6d3b; outline: 0; }
.rjl-count { font-size: 13px; color: #6b5f4f; margin: 4px 0 0; text-align: right; }
.rjl-note {
	margin: 16px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #f5f0e6;
	font-size: 13px;
	line-height: 1.7;
}
.rjl-error { color: #b5452f; font-weight: 700; margin: 10px 0 0; min-height: 1em; }
.rjl-add {
	display: block;
	width: 100%;
	margin-top: 10px;
	border: 0;
	border-radius: 999px;
	padding: 14px 18px;
	font-size: 17px;
	font-weight: 700;
	background: #8a6d3b;
	color: #fff;
	cursor: pointer;
}
.rjl-add[disabled] { opacity: .6; cursor: wait; }
html.rjl-lock, html.rjl-lock body { overflow: hidden; }

/* サイト全体の書体（ゆうせいマジック）の決まりより強くして、便箋と書体の見本は、えらんだ書体で出す */
html body:not(#rjx) .rjl-sheet:not(#rjl-a):not(#rjl-b):not(#rjl-c),
html body:not(#rjx) .rjl-sheet:not(#rjl-a):not(#rjl-b):not(#rjl-c) *,
html body:not(#rjx) .rjl-chip__sample:not(#rjl-a):not(#rjl-b):not(#rjl-c) {
	font-family: var(--rjl-font), 'Klee One', serif !important;
	font-weight: 400 !important;
}
