:root {
	color-scheme: light;
	font-family: "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
	font-size: 18px;
	--bg: #f6f7fb;
	--panel: #ffffff;
	--primary: #ff6f1e;
	--secondary: #2a2d34;
	--muted: #6b7280;
	--border: #e5e7eb;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--secondary);
}

.app {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 24px;
}

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.header h1 {
	margin: 0;
	font-size: 1.8rem;
}

.subtitle {
	margin: 6px 0 0;
	color: var(--muted);
}

.content {
	flex: 1;
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

.panel {
	background: var(--panel);
	border-radius: 18px;
	padding: 20px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.menu-list {
	display: grid;
	gap: 16px;
}

.menu-panel {
	padding-top: 12px;
}

.menu-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: 14px;
	gap: 16px;
}

.menu-media {
	width: 120px;
	height: 90px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--border);
	background: #fff;
	display: grid;
	place-items: center;
	flex-shrink: 0;
}

.menu-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.menu-info h3 {
	margin: 0 0 4px;
	font-size: 1.2rem;
}

.menu-info {
	text-align: center;
}

.menu-note {
	margin: 6px 0 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.quantity {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 1.1rem;
}

.qty-btn {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: #fff;
	font-size: 1.5rem;
	cursor: pointer;
}

.qty-value {
	min-width: 32px;
	text-align: center;
	font-weight: 600;
}

.sauce-section {
	margin-top: 20px;
	display: grid;
	gap: 12px;
}

.helper-text {
	margin: 0;
	color: var(--muted);
}

.order-list {
	display: grid;
	gap: 12px;
	min-height: 120px;
}

.order-item {
	padding: 14px;
	border: 1px dashed var(--border);
	border-radius: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	font-size: 0.95rem;
}

.order-item .meta {
	color: var(--muted);
	font-size: 0.9rem;
}

.summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 16px;
	font-size: 1.2rem;
}

.status-text {
	min-height: 24px;
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.empty-state {
	color: var(--muted);
	text-align: center;
	padding: 20px 0;
}

.primary-button,
.secondary-button,
.ghost-button {
	width: 100%;
	height: 56px;
	border-radius: 14px;
	font-size: 1.05rem;
	border: none;
	cursor: pointer;
}

.primary-button {
	background: var(--primary);
	color: #fff;
	font-weight: 700;
}

.secondary-button {
	background: #fff;
	border: 1px solid var(--border);
}

.navy-button {
	background: #1f2a44;
	color: #fff;
	border: none;
}

.ghost-button {
	width: auto;
	padding: 0 18px;
	background: transparent;
	border: 1px solid var(--border);
	color: var(--secondary);
}

.action-row {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 12px;
	align-items: center;
}

.action-row .primary-button,
.action-row .secondary-button {
	width: 100%;
	height: 56px;
}

.footer {
	padding-bottom: 8px;
}

.payment-screen {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.7);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 999;
}

.payment-screen.is-visible {
	display: flex;
}

.payment-card {
	width: min(640px, 100%);
	background: #fff;
	border-radius: 20px;
	padding: 28px;
	display: grid;
	gap: 16px;
	text-align: center;
}

#paymentBankLine {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--secondary);
	margin: 0;
}

.payment-qr {
	width: 320px;
	height: 320px;
	margin: 0 auto;
	border-radius: 18px;
	border: 2px dashed var(--border);
	display: grid;
	place-items: center;
	background: #fff;
}

.payment-qr img {
	width: 280px;
	height: 280px;
	object-fit: cover;
}

.modal {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 1000;
}

.modal.is-visible {
	display: flex;
}

.modal-card {
	width: min(560px, 100%);
	background: #fff;
	border-radius: 20px;
	padding: 24px;
	display: grid;
	gap: 16px;
	text-align: center;
}

.modal-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
}

.sauce-button {
	border: 1px solid var(--border);
	padding: 12px 10px;
	border-radius: 12px;
	background: #fff;
	font-size: 1rem;
	cursor: pointer;
}

.qr-panel {
	background: var(--panel);
	border-radius: 18px;
	padding: 20px;
	display: grid;
	gap: 16px;
	width: 100%;
	--qr-size: 180px;
	grid-template-columns: minmax(0, 1fr) var(--qr-size) minmax(0, 1fr);
	grid-template-rows: auto auto;
	align-items: center;
	justify-items: stretch;
}

.qr-panel>div:first-child {
	grid-column: 1;
	grid-row: 1 / 3;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.qr-panel .qr-box {
	grid-column: 2;
	grid-row: 1;
	justify-self: center;
	align-self: center;
}

.qr-panel .bank-info {
	grid-column: 3;
	grid-row: 1 / 3;
	justify-self: stretch;
	align-self: stretch;
	text-align: right;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.qr-panel .qr-actions {
	grid-column: 2;
	grid-row: 2;
	justify-self: center;
	width: var(--qr-size);
}

.contact-info {
	margin: 12px 0 0;
	font-size: 1.7rem;
	font-weight: 600;
	color: var(--secondary);
}

.bank-info {
	display: grid;
	gap: 6px;
	font-size: 1.8rem;
	color: var(--secondary);
}

.bank-name {
	margin: 0;
	font-weight: 600;
	font-size: 1.8rem;
}

.bank-number {
	margin: 0;
	color: var(--muted);
	font-size: 2.1rem;
	font-weight: 700;
}

.qr-actions {
	display: grid;
	gap: 10px;
	width: 100%;
}

.qr-actions .secondary-button {
	width: 100%;
}

.qr-box {
	width: var(--qr-size);
	height: var(--qr-size);
	border: 2px dashed var(--border);
	border-radius: 18px;
	display: grid;
	place-items: center;
	background: #fff;
}

.qr-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 1024px) {
	:root {
		font-size: 16px;
	}

	.app {
		padding: 16px;
		gap: 18px;
	}

	.header h1 {
		font-size: 1.5rem;
	}

	.panel {
		padding: 16px;
	}

	.menu-media {
		width: 100px;
		height: 75px;
	}

	.qty-btn {
		width: 44px;
		height: 44px;
		font-size: 1.3rem;
	}

	.primary-button,
	.secondary-button,
	.ghost-button {
		height: 50px;
		font-size: 1rem;
	}

	.payment-card {
		width: min(520px, 100%);
		padding: 22px;
	}

	.payment-qr {
		width: 260px;
		height: 260px;
	}

	.payment-qr img {
		width: 230px;
		height: 230px;
	}

	.qr-panel {
		--qr-size: 160px;
	}

	.qr-image {
		width: 100%;
		height: 100%;
	}
}

@media (min-width: 900px),
(orientation: landscape) {
	.content {
		grid-template-columns: 1.2fr 1fr;
	}

	.footer {
		display: block;
	}

	.qr-panel {
		grid-template-columns: 1fr auto;
		align-items: center;
	}

	.qr-actions {
		justify-self: end;
		width: auto;
	}
}