/* ぽかぽか編集アプリ。本文 18px 以上、押す所は高さ 56px 以上、スマホ優先。色は brand.css */
:root {
	--font: "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", system-ui, sans-serif;
	--r: 24px;
	--shadow: 0 14px 30px -20px rgba(90, 60, 20, .45);
	color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--cream); color: var(--ink);
	font-family: var(--font); font-size: 18px; line-height: 1.8; letter-spacing: .03em;
	min-height: 100vh; min-height: 100dvh;
	word-break: auto-phrase; line-break: strict;
	-webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1 { font-size: 26px; line-height: 1.5; font-weight: 700; letter-spacing: .05em; }
h2 { font-size: 22px; line-height: 1.5; font-weight: 700; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ------------------------------------------------ ヘッダー */
.top {
	position: sticky; top: 0; z-index: 10;
	background: var(--header-bg); border-bottom: 3px solid var(--sun);
	padding-top: env(safe-area-inset-top, 0px);
}
.top__in {
	max-width: 640px; margin: 0 auto; min-height: 68px;
	padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
	display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand__mark { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.brand__text { display: grid; line-height: 1.3; min-width: 0; }
.brand__sub { font-size: 16px; color: var(--ink-2); }
.brand__name { font-size: 21px; font-weight: 700; letter-spacing: .06em; }

/* ------------------------------------------------ 画面の枠 */
.page { max-width: 640px; margin: 0 auto; padding: 24px max(20px, env(safe-area-inset-right, 0px)) 64px max(20px, env(safe-area-inset-left, 0px)); display: grid; gap: 24px; }
.stack { display: grid; gap: 16px; }
.lead { font-size: 19px; }
.muted { color: var(--ink-2); font-size: 17px; }
.center { text-align: center; }
.card {
	background: var(--white); border: 2px solid var(--line); border-radius: var(--r);
	padding: 22px 20px; box-shadow: var(--shadow); display: grid; gap: 14px;
}
.hello { font-size: 24px; font-weight: 700; }

.back {
	display: inline-flex; align-items: center; gap: 6px; min-height: 56px; padding: 0 18px 0 12px; margin-left: -6px;
	font-size: 19px; font-weight: 700; color: var(--leaf-deep); text-decoration: none; border-radius: 999px; justify-self: start;
}
.back:hover { background: var(--leaf-soft); }

/* ------------------------------------------------ ボタン */
.btn {
	display: flex; align-items: center; justify-content: center; gap: .5em; width: 100%;
	min-height: 64px; padding: 10px 24px; border: 0; border-radius: 999px; cursor: pointer;
	font-size: 20px; font-weight: 700; letter-spacing: .06em; line-height: 1.4; text-align: center; text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.btn--sun { background: var(--sun); color: var(--ink); box-shadow: 0 5px 0 var(--sun-deep); }
.btn--sun:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--sun-deep); }
.btn--sun:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--sun-deep); }
.btn--line { background: var(--white); border: 2px solid var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--white); }
.btn--green { background: var(--leaf); color: var(--white); box-shadow: 0 5px 0 var(--leaf-deep); }
.btn--green:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--leaf-deep); }
.btn--danger { background: var(--white); border: 2px solid var(--apple); color: var(--apple); }
.btn--danger:hover { background: var(--apple); color: var(--white); }
.btn--small { min-height: 56px; font-size: 18px; padding: 8px 20px; width: auto; }
.btn[disabled] { opacity: .55; cursor: progress; transform: none; }

/* ------------------------------------------------ メッセージ */
.msg { border-radius: 16px; padding: 14px 16px; font-size: 18px; }
.msg--err { background: var(--apple-soft); border: 2px solid var(--apple); }
.msg--ok { background: var(--leaf-soft); border: 2px solid var(--leaf); }
.msg--info { background: var(--sun-soft); border: 2px solid var(--sun); }

/* ------------------------------------------------ ホームの大きな4つ */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile {
	display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 160px; padding: 16px 10px;
	border-radius: var(--r); border: 2px solid var(--line); text-decoration: none; color: var(--ink); text-align: center;
	font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: .04em; box-shadow: var(--shadow);
	transition: transform .15s ease;
}
.tile:active { transform: scale(.97); }
.tile__ico { font-size: 44px; line-height: 1.1; }
.tile--chat { background: var(--sun-soft); border-color: var(--sun); }
.tile--notice { background: var(--sky-soft); border-color: var(--sky); }
.tile--undo { background: var(--leaf-soft); border-color: var(--leaf); }
.tile--help { background: var(--white); border-color: var(--orange); }
.settings-link { justify-self: center; }

/* ------------------------------------------------ お知らせ・一覧 */
.list { display: grid; gap: 14px; }
.row { background: var(--white); border: 2px solid var(--line); border-radius: 20px; padding: 16px 18px; display: grid; gap: 10px; }
.row__main { font-size: 19px; font-weight: 700; line-height: 1.5; word-break: break-word; }
.row__meta { font-size: 16px; color: var(--ink-2); line-height: 1.6; }
.tag { display: inline-block; font-size: 16px; font-weight: 700; padding: 0 10px; border-radius: 999px; background: var(--sky-soft); margin-right: 6px; }
.tag--alert { background: var(--apple-soft); color: var(--apple); }
.empty { text-align: center; color: var(--ink-2); padding: 28px 0; }

.menu { display: grid; gap: 14px; }
.menu .btn { justify-content: flex-start; text-align: left; padding-left: 26px; }

/* ------------------------------------------------ 入力 */
.field { display: grid; gap: 8px; }
.field label { font-size: 19px; font-weight: 700; }
.input {
	width: 100%; min-height: 60px; border: 2px solid var(--ink); border-radius: 16px; padding: 10px 16px;
	font: inherit; font-size: 20px; background: var(--white); color: var(--ink);
}
.input:focus { outline: 3px solid var(--leaf); outline-offset: 2px; }

/* ------------------------------------------------ QR・招待 */
.qrbox { display: grid; justify-items: center; gap: 14px; }
.qr { width: min(280px, 80vw); height: auto; aspect-ratio: 1; border: 2px solid var(--line); border-radius: 16px; background: #fff; }
.linkbox { width: 100%; font-size: 16px; min-height: 56px; }
.btnrow { display: grid; gap: 12px; width: 100%; }

/* ------------------------------------------------ アプリを入れる案内（iPhone） */
.guide { display: grid; gap: 18px; }
.step { display: grid; gap: 10px; background: var(--white); border: 2px solid var(--line); border-radius: 20px; padding: 16px; }
.step__head { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 700; line-height: 1.5; }
.step__no { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.step svg { width: 100%; max-width: 300px; height: auto; margin: 0 auto; display: block; }

/* ------------------------------------------------ 確認の小窓 */
dialog.dlg {
	border: 0; border-radius: var(--r); padding: 24px 22px; width: min(92vw, 460px); background: var(--white); color: var(--ink);
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .5);
}
dialog.dlg::backdrop { background: rgba(58, 50, 43, .55); }
dialog.dlg form { display: grid; gap: 16px; margin: 0; }
.dlg__btns { display: grid; gap: 12px; }

.spinner { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--sun); animation: spin 1s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .btn, .tile { transition: none; } }

/* ------------------------------------------------ 広い画面（PC） */
@media (min-width: 700px) {
	.page { padding-top: 40px; }
	h1 { font-size: 30px; }
	.btnrow { grid-template-columns: 1fr 1fr; }
}
