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

body {
    background: #ffffff;
    color: #111;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    margin: 0;
    line-height: 1.5;
}

.container {
    max-width: 540px;
    margin: 40px auto;
    padding: 0 20px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-row h1 {
    font-size: 24px;
    margin: 0;
    font-weight: 700;
}

.new-word-btn {
    border: 1px solid #111;
    background: #fff;
    color: #111;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.new-word-btn:hover {
    background: #f3f3f3;
}

.status-bar {
    border: 1px solid #111;
    padding: 10px 12px;
    margin: 14px 0;
    background: #fafafa;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.chat-log {
    border: 1px solid #111;
    padding: 14px;
    min-height: 280px;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    font-size: 14px;
}

.msg-row {
    margin: 0 0 10px 0;
    word-wrap: break-word;
}

.msg-row:last-child {
    margin-bottom: 0;
}

.msg-role {
    font-weight: 700;
    margin-right: 6px;
}

.hit-word {
    font-weight: 700;
    text-decoration: underline;
}

.chat-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

#chat-input {
    flex: 1;
    border: 1px solid #111;
    padding: 10px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
    color: #111;
    outline: none;
}

#send-btn {
    border: 1px solid #111;
    background: #111;
    color: #fff;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
}

#send-btn:hover {
    background: #333;
}
