* { box-sizing: border-box; }
body { margin: 0; font-family: "Hiragino Sans", "Noto Sans JP", sans-serif; background: #eef1f8; color: #222; }
.site-header { background: linear-gradient(120deg, #1d2a6b, #0e7a6d); color: #fff; padding: 28px 16px 20px; text-align: center; }
.site-header h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: .05em; }
.tagline { margin: 0 0 14px; opacity: .9; font-size: 14px; }
.status-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.status-bar span { background: rgba(255,255,255,.16); padding: 6px 14px; border-radius: 999px; font-size: 14px; }
.streak { color: #ffd9a0; font-weight: bold; }
.nickname-row { font-size: 14px; }
.nickname-row input { padding: 6px 10px; border-radius: 8px; border: none; width: 160px; }
button { background: #e4572e; color: #fff; border: none; padding: 9px 18px; border-radius: 999px; font-size: 15px; cursor: pointer; }
button:disabled { background: #aaa; cursor: default; }
button.secondary { background: #1d2a6b; }
main { max-width: 720px; margin: 0 auto; padding: 18px 14px 40px; }
.card, .puzzle { background: #fff; border-radius: 18px; padding: 20px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(20,30,80,.08); }
.puzzle h2 { margin: 0 0 4px; font-size: 20px; }
.puzzle .instruction { color: #666; font-size: 14px; margin: 0 0 12px; }
.puzzle .prompt { font-size: 30px; font-weight: bold; text-align: center; letter-spacing: .08em; padding: 14px 6px; background: #f2f4fb; border-radius: 12px; margin-bottom: 6px; word-break: keep-all; }
.puzzle .sub { text-align: center; color: #888; font-size: 13px; margin: 0 0 14px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.options button { background: #fff; color: #1d2a6b; border: 2px solid #1d2a6b; font-size: 20px; padding: 12px; border-radius: 12px; }
.options button:hover:not(:disabled) { background: #eef; }
.options button.wrong { border-color: #c0392b; color: #c0392b; background: #fdecea; }
.options button.correct { border-color: #0e7a6d; background: #0e7a6d; color: #fff; }
.puzzle .feedback { min-height: 22px; text-align: center; font-weight: bold; margin-top: 10px; }
.puzzle .done-badge { color: #0e7a6d; }
.hidden { display: none !important; }
#share-canvas { width: 100%; max-width: 420px; display: block; margin: 10px auto; border-radius: 12px; }
.share-buttons { display: flex; gap: 10px; justify-content: center; }
.hint, .msg { color: #777; font-size: 13px; text-align: center; }
.join-row { margin-top: 10px; display: flex; gap: 8px; }
.join-row input { flex: 1; padding: 9px; border-radius: 8px; border: 1px solid #bbb; text-transform: uppercase; }
table { width: 100%; border-collapse: collapse; margin: 10px 0; }
th, td { padding: 8px; border-bottom: 1px solid #eee; text-align: left; }
footer { text-align: center; color: #999; font-size: 12px; padding-bottom: 24px; }
