:root { --cmmf-accent: #1a3c5e; }
html.cmmf-lock { overflow: hidden; }
.cmmf-overlay { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .6); animation: cmmf-fade .25s ease; }
.cmmf-dialog { position: relative; box-sizing: border-box; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; padding: 32px 28px 24px; border-radius: 12px; background: #fff; color: #222; font-family: inherit; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.cmmf-title { margin: 0 0 10px; font-size: 1.6rem; line-height: 1.2; color: var(--cmmf-accent); outline: none; }
.cmmf-text { margin: 0 0 18px; font-size: 1rem; line-height: 1.5; }
.cmmf-close { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #444; font-size: 28px; line-height: 1; cursor: pointer; }
.cmmf-close:hover { background: #f0f0f0; }
.cmmf-form { display: flex; flex-direction: column; gap: 12px; }
.cmmf-input { box-sizing: border-box; width: 100%; padding: 13px 14px; border: 1px solid #bbb; border-radius: 8px; font-size: 16px; font-family: inherit; }
.cmmf-btn { display: block; box-sizing: border-box; width: 100%; padding: 14px 16px; border: 0; border-radius: 8px; background: var(--cmmf-accent); color: #fff; font-size: 1rem; font-weight: 700; font-family: inherit; letter-spacing: .03em; text-align: center; text-decoration: none; cursor: pointer; }
.cmmf-btn:hover { filter: brightness(1.12); color: #fff; }
.cmmf-btn[disabled] { opacity: .7; cursor: wait; }
.cmmf-btn-alt { background: #fff; color: var(--cmmf-accent); border: 2px solid var(--cmmf-accent); margin-top: 10px; }
.cmmf-btn-alt:hover { color: var(--cmmf-accent); background: #f6f6f6; }
.cmmf-loading::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: cmmf-spin .7s linear infinite; }
.cmmf-consent { display: flex; align-items: flex-start; gap: 8px; text-align: left; font-size: .85rem; line-height: 1.4; cursor: pointer; }
.cmmf-consent input { margin-top: 3px; }
.cmmf-msg { min-height: 1.3em; font-size: .9rem; }
.cmmf-error { color: #b00020; }
.cmmf-ok { color: #1b7a3a; }
.cmmf-info { color: #555; }
.cmmf-privacy, .cmmf-note { margin: 4px 0 0; font-size: .78rem; line-height: 1.4; color: #666; }
.cmmf-code { margin: 6px 0 8px; padding: 14px 10px; border: 2px dashed var(--cmmf-accent); border-radius: 8px; background: #f8f8f8; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.35rem; font-weight: 700; letter-spacing: .08em; word-break: break-all; user-select: all; }
.cmmf-expiry { margin: 0 0 14px; font-size: .9rem; color: #444; }
.cmmf-link { align-self: center; margin-top: 6px; padding: 4px; border: 0; background: none; color: var(--cmmf-accent); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.cmmf-sr, .cmmf-hp { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.cmmf-dialog :focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }
@keyframes cmmf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmmf-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
	.cmmf-dialog { padding: 28px 18px 18px; }
	.cmmf-title { font-size: 1.35rem; }
	.cmmf-code { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.cmmf-overlay, .cmmf-loading::after { animation: none; }
}
