* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: #f4f6f9; color: #1f2937; }
.topbar { display: flex; justify-content: space-between; align-items: center; background: #0f172a; color: #fff; padding: 0.9rem 1.5rem; }
.topbar .brand { font-weight: 700; font-size: 1.2rem; }
.topbar nav a { color: #cbd5e1; text-decoration: none; margin-left: 1.2rem; font-size: 0.92rem; }
.topbar nav a:hover { color: #fff; }
.topbar .who { color: #93c5fd; font-size: 0.9rem; }
.container { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }
.hero { text-align: center; padding: 4rem 1rem; }
.hero h1 { font-size: 2.1rem; margin-bottom: 0.5rem; }
.hero p { color: #4b5563; margin-bottom: 1.8rem; }
.btn { display: inline-block; background: #2563eb; color: #fff; padding: 0.7rem 1.4rem; border-radius: 8px; text-decoration: none; margin: 0 0.4rem; font-weight: 600; }
.btn-secondary { background: #e5e7eb; color: #1f2937; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }
.card { display: block; background: #fff; border-radius: 12px; padding: 1.6rem; text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border: 1px solid #e5e7eb; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.card-icon { font-size: 2.2rem; }
.card h2 { margin: 0.4rem 0; font-size: 1.25rem; }
.card p { color: #6b7280; font-size: 0.92rem; }
.card-link { color: #2563eb; font-weight: 600; font-size: 0.9rem; }
.form-card { max-width: 420px; margin: 2rem auto; background: #fff; padding: 2rem; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border: 1px solid #e5e7eb; }
.form-card h2 { margin-top: 0; }
.form-card label { display: block; margin-bottom: 1rem; font-size: 0.9rem; color: #374151; }
.form-card input { width: 100%; padding: 0.55rem 0.7rem; margin-top: 0.3rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.95rem; }
.form-card button { width: 100%; padding: 0.7rem; background: #2563eb; color: #fff; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 0.95rem; }
.form-card button:hover { background: #1d4ed8; }
.muted { color: #6b7280; font-size: 0.9rem; }
.error { background: #fee2e2; color: #991b1b; padding: 0.7rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.flash { background: #dbeafe; color: #1e3a8a; padding: 0.8rem 1rem; border-radius: 6px; margin-bottom: 1.2rem; font-size: 0.9rem; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid #e5e7eb; font-size: 0.9rem; }
.btn-danger { background: #fee2e2 !important; color: #991b1b !important; }

#jap-chat-btn { position: fixed; bottom: 22px; right: 22px; width: 54px; height: 54px; border-radius: 50%; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.25); z-index: 999; }
#jap-chat-box { display: none; flex-direction: column; position: fixed; bottom: 86px; right: 22px; width: 300px; height: 380px; background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); overflow: hidden; z-index: 999; }
#jap-chat-head { background: #0f172a; color: #fff; padding: 0.7rem 1rem; font-weight: 600; display: flex; justify-content: space-between; }
#jap-chat-close { cursor: pointer; }
#jap-chat-log { flex: 1; overflow-y: auto; padding: 0.8rem; font-size: 0.88rem; }
.jap-msg { margin-bottom: 0.6rem; padding: 0.5rem 0.7rem; border-radius: 8px; max-width: 85%; }
.jap-msg.bot { background: #f1f5f9; }
.jap-msg.user { background: #2563eb; color: #fff; margin-left: auto; }
#jap-chat-form { border-top: 1px solid #e5e7eb; display: flex; }
#jap-chat-input { flex: 1; border: none; padding: 0.7rem; font-size: 0.9rem; outline: none; }
