@charset "UTF-8";
/* app.css - 全ページ共通のトークンと部品 */

@font-face {
	font-family: "Instrument Sans";
	src: url("../fonts/InstrumentSans-Regular.woff") format("woff");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Instrument Sans";
	src: url("../fonts/InstrumentSans-Bold.woff") format("woff");
	font-weight: 600 700;
	font-display: swap;
}

:root {
	/* 色：インクと、ロゴ（favicon.png）の水色 */
	--ink: #1A2340;
	--ink-2: #3A4562;
	--muted: #667085;
	--rule: #DDE2EA;
	--rule-soft: #EDF0F4;
	--sheet: #F2F4F7;
	--surface: #FFFFFF;
	--hover: #F7F8FA;
	--brand: #A0D7DE;          /* ロゴの水色。白地では薄いので面の塗りに限定 */
	--accent: #1F9AAA;         /* 部品用の濃い水色（白地で 3.3:1） */
	--danger: #C42B3A;
	--danger-soft: #FCEDEF;

	/* 角丸：面 > 操作部品 > タグ の順で小さく */
	--radius-panel: 10px;
	--radius-control: 6px;
	--radius-tag: 4px;

	--font: "Instrument Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
}

[v-cloak] { display: none; }

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

html { -webkit-text-size-adjust: 100%; }

body {
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.6;
	background-color: var(--sheet);
	color: var(--ink-2);
	-webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

a { color: var(--ink); }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.num { font-variant-numeric: tabular-nums; }

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- ヘッダー ---------- */
.app-header {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 56px;
	padding: 0 24px;
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	text-decoration: none;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* ロゴマーク：水色のロゴをインクのタイルに載せる */
.brand-mark {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 8px;
	border-radius: 8px;
	background: var(--ink);
	flex-shrink: 0;
}

.brand-mark img {
	display: block;
	height: 20px;
	width: auto;
}

.brand-scope {
	margin-left: 2px;
	padding: 1px 8px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	letter-spacing: 0;
}

/* メニュー：ヘッダーの下端に下線を引いて今のページを示す */
.app-nav {
	display: flex;
	align-self: stretch;
	gap: 4px;
	margin-right: auto;
	margin-left: 12px;
}

.app-nav__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 12px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.app-nav__link:hover { color: var(--ink); }

.app-nav__link.active { color: var(--ink); }

.app-nav__link.active::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: -1px;
	height: 2px;
	border-radius: 2px 2px 0 0;
	background: var(--ink);
}

/* 承諾待ちの件数 */
.app-nav__badge {
	display: inline-grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* 開催中のイベント（アプリ名の右に「for コミックマーケット110」） */
.brand__event {
	max-width: 240px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
	letter-spacing: 0;
}

.app-user {
	position: relative;
	display: inline-flex;
	align-items: center;
	font-size: 13px;
	color: var(--ink-2);
	min-width: 0;
}

/* 右上のユーザー：押すとメニュー（履歴・管理・ログアウト） */
.app-user__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	height: 36px;
	padding: 0 8px 0 4px;
	border: 0;
	border-radius: var(--radius-control);
	background: none;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.app-user__button:hover,
.app-user__button[aria-expanded="true"] { background: var(--hover); }
.app-user__caret { flex-shrink: 0; color: var(--muted); }

.app-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 60;
	min-width: 200px;
	padding: 4px 0;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius-control);
	box-shadow: 0 4px 16px rgba(26, 35, 64, 0.12);
}

.app-menu__item {
	display: block;
	width: 100%;
	padding: 9px 14px;
	border: 0;
	background: none;
	font: inherit;
	font-size: 13px;
	color: var(--ink);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.app-menu__item:hover,
.app-menu__item:focus-visible { background: var(--hover); }
.app-menu__item.active { font-weight: 700; }

.app-user__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 200px;
}

.avatar {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--sheet);
	border: 1px solid var(--rule);
	color: var(--ink);
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
}

/* ---------- レイアウト ---------- */
.page {
	max-width: 1320px;
	margin: 0 auto;
	padding: 28px 24px 64px;
}

.page-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--ink);
	letter-spacing: -0.01em;
	margin-bottom: 20px;
}

/* ---------- ボタン ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 36px;
	padding: 0 14px;
	border: 1px solid transparent;
	border-radius: var(--radius-control);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.12s, border-color 0.12s;
}

.btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.btn-primary {
	background: var(--ink);
	color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) { background: #2A3660; }

.btn-secondary {
	background: var(--surface);
	color: var(--ink);
	border-color: var(--rule);
}

.btn-secondary:hover:not(:disabled) {
	background: var(--hover);
	border-color: #C7CEDA;
}

.btn-ghost {
	height: 30px;
	padding: 0 10px;
	background: transparent;
	color: var(--ink-2);
}

.btn-ghost:hover:not(:disabled) { background: var(--sheet); }

.btn-danger {
	background: var(--surface);
	border-color: #E5A9B0;
	color: var(--danger);
}

.btn-danger:hover:not(:disabled) { background: var(--danger-soft); }

.btn-ghost.is-danger { color: var(--danger); }
.btn-ghost.is-danger:hover:not(:disabled) { background: var(--danger-soft); }

.text-link {
	color: var(--ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--rule);
	text-underline-offset: 3px;
}

.text-link:hover { text-decoration-color: var(--accent); }

button.text-link {
	background: none;
	border: none;
	cursor: pointer;
	font-size: inherit;
}

/* ---------- 日程の切り替え（最小限のセグメント） ---------- */
.list-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.list-head__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.day-switch {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	background: #E4E8EE;
	border-radius: 9px;
	flex-shrink: 0;
}

.day-tab {
	height: 30px;
	padding: 0 14px;
	background: transparent;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.12s, color 0.12s;
}

.day-tab:hover:not(.active) { color: var(--ink); }

.day-tab.active {
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 1px 2px rgba(26, 35, 64, 0.12);
}

/* 集計：リストの下 */
.list-summary {
	display: flex;
	justify-content: flex-end;
	gap: 40px;
	margin-top: 16px;
	padding: 0 4px;
	font-variant-numeric: tabular-nums;
}

.list-summary__item {
	display: grid;
	justify-items: end;
	text-align: right;
}

.list-summary__label {
	font-size: 12px;
	color: var(--muted);
}

.list-summary__amount {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ink);
	letter-spacing: -0.01em;
}

.list-summary__sub {
	font-size: 12px;
	color: var(--muted);
}

.list-note {
	margin: -4px 0 12px;
	font-size: 13px;
	color: var(--muted);
}

.select {
	height: 36px;
	padding: 0 32px 0 12px;
	border: 1px solid var(--rule);
	border-radius: var(--radius-control);
	background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
	appearance: none;
	font-size: 13px;
	color: var(--ink);
	cursor: pointer;
}

/* ---------- テーブル ---------- */
.table-panel {
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius-panel);
	overflow-x: auto;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.data-table th {
	position: sticky;
	top: 0;
	padding: 10px 12px;
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	white-space: nowrap;
	user-select: none;
}

.data-table th.sortable { cursor: pointer; }
.data-table th.sortable:hover { color: var(--ink); }
.data-table th.is-sorted { color: var(--ink); }

.data-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--rule-soft);
	vertical-align: middle;
	color: var(--ink-2);
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--hover); }

.data-table .center { text-align: center; }
.data-table .right { text-align: right; }

.data-table td.price {
	text-align: right;
	font-weight: 600;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.data-table .cell-muted { color: var(--muted); }

.data-table td a {
	color: var(--ink-2);
	text-decoration: none;
}

.data-table td a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.circle-name {
	font-weight: 600;
	color: var(--ink);
	transition: color 0.2s ease-out;
}

/* 購入済みの行：回るときにもう見なくていいので、行全体を灰色で引っ込める。状態はチェックボックスで示す */
.checked-row td,
.checked-row td.price,
.checked-row td a:not(.space-code),
.checked-row .circle-name { color: var(--muted); }
.checked-row .circle-name,
.checked-row td.price { font-weight: 400; }
/* 文字色だけでは差が小さいので、面の色でも区別する（未購入の白い行が浮き上がって見える） */
.data-table tbody tr.checked-row td { background: var(--sheet); }
.data-table tbody tr.checked-row:hover td { background: #EBEEF2; }

/* スペースタグ：記号・番号・a/b */
.space-code {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--rule);
	border-radius: var(--radius-tag);
	overflow: hidden;
	font-size: 13px;
	font-weight: 700;
	line-height: 22px;
	color: var(--ink);
	background: var(--surface);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.space-code__main { padding: 0 6px; }

.space-code__side {
	padding: 0 6px;
	background: var(--ink);
	color: #FFFFFF;
	font-weight: 600;
}

.checked-row .space-code { opacity: 0.55; }

/* チェックボックス */
.check {
	appearance: none;
	-webkit-appearance: none;
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 1.5px solid #B4BCCB;
	border-radius: 5px;
	background: var(--surface) no-repeat center / 12px 12px;
	vertical-align: middle;
	cursor: pointer;
	transition: background-color 0.12s, border-color 0.12s;
}

.check:hover { border-color: var(--ink-2); }

.check:checked {
	background-color: var(--accent);
	border-color: var(--accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.4 2.4 4.6-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.done-mark {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--accent);
}

.empty-state {
	padding: 56px 20px;
	text-align: center;
	color: var(--muted);
}

.empty-state strong {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
	color: var(--ink);
}

/* ---------- モーダル ---------- */
.modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(26, 35, 64, 0.45);
	animation: overlay-in 0.15s ease-out;
}

.modal {
	display: flex;
	flex-direction: column;
	width: 560px;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	background: var(--surface);
	border-radius: 12px;
	box-shadow: 0 24px 48px -12px rgba(26, 35, 64, 0.35);
	animation: modal-in 0.18s ease-out;
}

.modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 24px;
	border-bottom: 1px solid var(--rule-soft);
}

.modal__head h2 {
	font-size: 16px;
	font-weight: 700;
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.modal__close {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: var(--radius-control);
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	flex-shrink: 0;
}

.modal__close:hover {
	background: var(--sheet);
	color: var(--ink);
}

.modal__body {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 16px 12px;
	padding: 20px 24px;
	overflow-y: auto;
}

.modal__foot {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 14px 24px;
	border-top: 1px solid var(--rule-soft);
	background: var(--hover);
	border-radius: 0 0 12px 12px;
}

.field { grid-column: span 6; }
.field.span-2 { grid-column: span 2; }
.field.span-3 { grid-column: span 3; }
.field.span-4 { grid-column: span 4; }

.field label,
.field .field__label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--ink-2);
}

.field .req {
	margin-left: 4px;
	color: var(--accent);
}

.input {
	width: 100%;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--rule);
	border-radius: var(--radius-control);
	background: var(--surface);
	color: var(--ink);
	font-size: 14px;
	transition: border-color 0.12s, box-shadow 0.12s;
}

select.input {
	padding-right: 32px;
	appearance: none;
	background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
	cursor: pointer;
}

.input::placeholder { color: #A3ABBA; }

.input:focus {
	outline: none;
	border-color: var(--ink);
	box-shadow: 0 0 0 3px rgba(26, 35, 64, 0.12);
}

/* 前置き記号つき入力（@, ¥） */
.affix {
	position: relative;
}

.affix__mark {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--muted);
	pointer-events: none;
}

.affix .input { padding-left: 28px; }

.field__error {
	margin-top: 6px;
	font-size: 12px;
	color: var(--danger);
}

@keyframes overlay-in {
	from { opacity: 0; }
}

@keyframes modal-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}
}

/* 小さいダイアログ（依頼の相手・実際の金額） */
.modal--sm { width: 440px; }

.modal__body--stack {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.modal__lead { color: var(--ink-2); }

.field__hint {
	margin-top: 6px;
	font-size: 12px;
	color: var(--muted);
}

.check-label,
.field .check-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--ink);
	cursor: pointer;
}

/* 選択肢のリスト（ラジオボタン） */
.choice-list {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--rule);
	border-radius: var(--radius-control);
	overflow: hidden;
}

.choice {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	cursor: pointer;
}

.choice + .choice { border-top: 1px solid var(--rule-soft); }
.choice:hover { background: var(--hover); }
.choice:has(input:checked) { background: #EEF7F8; }
.choice.is-disabled { cursor: default; color: var(--muted); background: none; }
.choice input { accent-color: var(--accent); flex-shrink: 0; }

.choice__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.choice__title { font-weight: 600; color: var(--ink); }
.choice.is-disabled .choice__title { color: var(--muted); }
.choice__sub { font-size: 12px; color: var(--muted); }

/* ---------- 代行の状態 ---------- */
.proxy-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 2px;
	padding: 1px 8px;
	border-radius: 999px;
	border: 1px solid var(--rule);
	background: var(--surface);
	font-size: 11px;
	font-weight: 600;
	color: var(--ink-2);
	white-space: nowrap;
}

/* 相手の返事待ち */
.proxy-chip.is-wait { color: var(--muted); border-style: dashed; }
/* 自分が返事をする */
.proxy-chip.is-action { background: var(--accent); border-color: var(--accent); color: #fff; }
/* 担当が決まった */
.proxy-chip.is-done { background: var(--sheet); }
/* 自分が担当（ほかの人の分） */
.proxy-chip.is-mine { background: #EEF7F8; border-color: var(--brand); color: #136F7B; }

.btn-ghost.is-accent { color: #136F7B; }
.btn-ghost.is-accent:hover:not(:disabled) { background: #EEF7F8; }

/* ---------- 単独メッセージページ（エラー等） ---------- */
.notice {
	max-width: 520px;
	margin: 64px auto;
	padding: 32px;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius-panel);
}

.notice h2 {
	font-size: 18px;
	color: var(--ink);
	margin-bottom: 8px;
}

.notice p { margin-bottom: 20px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 860px) {
	.app-header { padding: 0 16px; }
	.page { padding: 12px 12px 48px; }

	.list-head { gap: 8px; }
	.day-tab { padding: 0 10px; }
	.list-head__actions { gap: 6px; }
	.list-head__actions .btn { padding: 0 10px; }

	.list-head { margin-bottom: 12px; }

	.list-summary {
		justify-content: space-between;
		gap: 16px;
	}

	.list-summary__amount { font-size: 18px; }

	.list-summary__item:first-child {
		justify-items: start;
		text-align: left;
	}

	.app-user__name { max-width: 120px; }
	.app-header { gap: 8px; }
	.app-nav { margin-left: 0; gap: 0; }
	.app-nav__link { padding: 0 8px; }
	.app-nav__link.active::after { left: 8px; right: 8px; }

	.modal__body { padding: 16px; }
	.modal__head,
	.modal__foot { padding-left: 16px; padding-right: 16px; }

	.field.span-2,
	.field.span-3,
	.field.span-4 { grid-column: span 6; }

	.hide-sm { display: none; }
}

@media (max-width: 560px) {
	.brand__name,
	.brand__event,
	.app-user__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

/* 終わったイベントを見ているときの帯（リスト・マップ） */
.past-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 16px;
	margin-bottom: 12px;
	padding: 10px 14px;
	border-left: 3px solid var(--muted);
	border-radius: 0 var(--radius-control) var(--radius-control) 0;
	background: var(--sheet);
	font-size: 13px;
	color: var(--ink-2);
}
