*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    font-size: 16px;
    background: #f5f7fb;
    color: #222;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1a73e8;
    color: #fff;
    padding: 0.6rem 1rem;
    text-align: center;
}

.app-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.app-main {
    padding: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
}

.app-footer {
    text-align: center;
    padding: 0.75rem 0.5rem 1.2rem;
    font-size: 0.75rem;
    color: #777;
}

.page-title {
    font-size: 1.3rem;
    margin: 0 0 0.75rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-link h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.card-link p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.toolbar-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

select,
input[type="search"],
input[type="number"],
input[type="text"] {
    padding: 0.35rem 0.45rem;
    border-radius: 0.4rem;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

input[type="number"] {
    width: 4.2rem;
}

input[type="search"] {
    min-width: 8rem;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: #1a73e8;
    color: #fff;
}

.btn-secondary {
    background: #e4ecf7;
    color: #174ea6;
}

.btn-warning {
    background: #fbbc05;
    color: #222;
}

.btn:active {
    transform: scale(0.97);
}

.list-container {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.vocab-item {
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid #eee;
}

.vocab-item.selected {
    background: #e8f0fe;
}

.vocab-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vocab-word {
    font-weight: 600;
}

.vocab-phonetic {
    font-size: 0.85rem;
    color: #174ea6;
}

.vocab-meaning {
    font-size: 0.9rem;
    color: #333;
    margin-top: 0.25rem;
}

.vocab-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #777;
}

.status-text {
    font-size: 0.85rem;
    color: #555;
    margin: 0.25rem 0;
}

.empty-tip {
    text-align: center;
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
    color: #777;
}

.dictation-panel,
.speaking-panel,
.review-panel,
.sentence-panel,
.daily-panel {
    margin-top: 0.3rem;
}

.dictation-meaning,
.speaking-meaning,
.review-meaning,
.sentence-meaning,
.daily-meaning {
    font-size: 1.1rem;
    margin: 0.4rem 0;
}

.dictation-phonetic,
.speaking-phonetic,
.review-phonetic,
.daily-phonetic {
    font-size: 0.95rem;
    color: #174ea6;
}

.dictation-input-group {
    margin: 0.5rem 0;
}

.input-large {
    width: 100%;
    font-size: 1rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.feedback-text {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    color: #0b8043;
}

.review-word,
.daily-word,
.speaking-word,
.sentence-word {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.3rem 0;
}

.status-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.tip-box {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #555;
}

.tip-box ul,
.tip-box ol {
    padding-left: 1.1rem;
}

@media (min-width: 768px) {
    .app-main {
        padding: 1rem 1.25rem 1.5rem;
    }
}

