:root {
color-scheme: light;
--app-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
--text-scale: 1;
--app-bg: #f4f5f7;
--app-color: #0f172a;
}
body {
margin: 0;
padding: 0 0 48px;
background: var(--app-bg);
color: var(--app-color);
font-family: var(--app-font);
transition: background 0.3s ease, color 0.3s ease;
}
.app {
max-width: 1100px;
margin: 0 auto;
padding: 32px 16px 0;
}
header {
margin-bottom: 24px;
}
header h1 {
margin: 0;
font-size: 2.2rem;
}
header p {
margin: 8px 0 0;
color: #475569;
line-height: 1.5;
}
.status {
font-size: 0.9rem;
color: #0f172a;
background: #e2e8f0;
display: none;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: 999px;
margin-top: 12px;
}
.status.visible {
display: inline-flex;
}
.layout {
display: flex;
flex-wrap: wrap;
gap: 20px;
align-items: stretch;
}
.panel {
background: #fff;
border-radius: 24px;
box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
padding: 20px 24px;
flex: 1 1 320px;
}
.panel.fullscreen-active {
position: fixed;
inset: 16px;
z-index: 1000;
width: auto;
height: calc(100% - 32px);
overflow: auto;
background: #fff;
}
body.fullscreen-mode {
overflow: hidden;
}
textarea {
width: 100%;
min-height: 380px;
border: 1px solid #cbd5f5;
border-radius: 18px;
font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
font-size: calc(0.95rem * var(--text-scale));
padding: 16px;
resize: vertical;
background: #f8fafc;
color: #0f172a;
}
#source-panel {
display: flex;
flex-direction: column;
min-height: 520px;
}
textarea:focus {
outline: 2px solid #0ea5e9;
border-color: #0ea5e9;
background: #fff;
}
label {
font-size: 0.95rem;
text-transform: uppercase;
letter-spacing: 0.06em;
font-weight: 600;
color: #64748b;
}
.label-button {
border: none;
background: transparent;
font-size: 0.95rem;
text-transform: uppercase;
letter-spacing: 0.06em;
font-weight: 600;
color: #64748b;
cursor: pointer;
padding: 0;
}
.label-button:focus-visible {
outline: 2px solid #0ea5e9;
border-radius: 8px;
}
.helper-row {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.85rem;
color: #94a3b8;
margin-top: 12px;
flex-wrap: wrap;
gap: 10px;
}
.control-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 12px;
align-items: center;
}
.slider-label {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 0.85rem;
color: #475569;
}
#reader-scale-slider {
width: 120px;
}
.share-checkbox {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 0.85rem;
color: #475569;
}
.share-checkbox input {
accent-color: #0ea5e9;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
#reader-scale-slider {
width: 120px;
}
button {
font: inherit;
outline: none;
border-radius: 999px;
padding: 8px 16px;
cursor: pointer;
}
.btn-primary {
background: #0ea5e9;
color: #fff;
font-weight: 600;
}
.btn-secondary {
background: transparent;
color: #475569;
border: 1px solid #cbd5f5;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
gap: 12px;
margin-top: 18px;
}
.stat-card {
background: #f8fafc;
border-radius: 18px;
padding: 12px 16px;
}
.stat-card h3 {
margin: 0;
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #94a3b8;
}
.stat-card p {
margin: 8px 0 0;
font-size: 1.4rem;
font-weight: 700;
}
.distribution-row {
margin-top: 16px;
display: grid;
grid-template-columns: 120px 1fr 60px;
gap: 12px;
align-items: center;
font-size: 0.9rem;
color: #475569;
}
.bar {
height: 10px;
border-radius: 999px;
background: #e2e8f0;
overflow: hidden;
}
.bar > span {
display: block;
height: 100%;
border-radius: 999px;
}
.chips {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 16px;
}
.chip {
border-radius: 999px;
background: #f8fafc;
border: 1px solid #e2e8f0;
padding: 6px 12px;
font-size: 0.85rem;
color: #0f172a;
}
.chip strong {
font-size: 1.1rem;
margin-left: 4px;
}
.tab-bar {
display: inline-flex;
margin-top: 16px;
background: #f1f5f9;
border-radius: 999px;
padding: 4px;
border: 1px solid #e2e8f0;
width: 100%;
gap: 4px;
}
.tab-button {
flex: 1;
border-radius: 999px;
padding: 10px 0;
font-weight: 600;
background: transparent;
color: #475569;
transition: background 0.2s ease, color 0.2s ease;
}
.tab-button.active {
background: #0ea5e9;
color: #fff;
}
.tab-view {
display: none;
margin-top: 16px;
flex: 1;
}
#tab-analyzer {
display: flex;
flex-direction: column;
gap: 10px;
}
#tab-analyzer textarea {
flex: 1;
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.tab-view.active {
display: block;
}
#tab-wordcloud {
display: none;
flex-direction: column;
}
#tab-wordcloud.active {
display: flex;
flex-direction: column;
}
.rainbow-grid {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 12px;
}
.rainbow-word {
padding: 8px 12px;
border-radius: 14px;
border: none;
cursor: pointer;
font-weight: 600;
min-width: unset;
width: auto;
display: inline-flex;
align-items: center;
justify-content: center;
font: inherit;
text-align: center;
box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
user-select: none;
white-space: nowrap;
}
.rainbow-word:focus-visible {
outline: 2px solid #fff;
outline-offset: 2px;
}
.highlight-area {
margin-top: 16px;
min-height: 140px;
border: 2px dashed #cbd5f5;
border-radius: 16px;
padding: 16px;
position: relative;
background: #f8fafc;
overflow: hidden;
}
.highlight-area.drag-over {
border-color: #0ea5e9;
background: #e0f2fe;
}
.highlight-pill {
position: absolute;
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
border-radius: 999px;
color: #fff;
font-weight: 600;
cursor: grab;
box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
white-space: nowrap;
user-select: none;
}
.highlight-pill.dragging {
opacity: 0.65;
cursor: grabbing;
}
.highlight-pill a,
.highlight-pill button {
border: none;
background: transparent;
color: inherit;
font-size: 0.85rem;
font-weight: 700;
line-height: 1;
cursor: pointer;
}
.highlight-pill a {
text-decoration: none;
}
.reader-panel {
--reader-bg: #fff7ed;
--reader-fg: #0f172a;
--reader-font: var(--app-font);
--reader-scale: 1.75;
--reader-line-height: 1.8;
--reader-letter-spacing: 0.04em;
display: flex;
flex-direction: column;
gap: 12px;
color: var(--reader-fg);
}
@media print {
body {
background: #fff;
color: #0f172a;
}
body * {
visibility: hidden;
}
#source-panel,
#tab-reader,
#reader-panel,
#reader-panel * {
visibility: visible;
}
#reader-panel {
margin: 0;
padding: 0;
box-shadow: none;
background: var(--reader-bg);
width: auto;
}
#tab-reader {
padding: 0;
width: 100%;
}
.panel,
#source-panel,
#tab-reader {
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
#reader-panel {
border-radius: 0 !important;
}
.control-row,
.share-checkbox,
.reader-controls,
#reader-panel .control-row,
#reader-panel label,
#reader-panel input,
#reader-panel button,
#at-a-glance-panel,
#wordcloud-panel,
#spotlight-panel,
#difficult-panel {
display: none !important;
}
#reader-highlight {
border: none;
background: transparent;
padding: 0;
margin: 0;
}
.highlight-text {
border: none;
background: var(--reader-bg);
box-shadow: none;
}
.highlight-text[data-active="false"] {
background: transparent;
color: inherit;
}
}
.reader-panel.fullscreen-active {
position: fixed;
inset: 16px;
z-index: 1000;
width: auto;
height: calc(100% - 32px);
overflow: auto;
background: #fff;
padding: 24px;
border-radius: 24px;
box-shadow: 0 10px 35px rgba(15, 23, 42, 0.15);
}
.reader-controls {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 12px;
}
body.fullscreen-mode {
overflow: hidden;
}
body.reader-mode .layout {
flex-direction: column;
}
body.reader-mode #source-panel {
flex-basis: 100%;
}
body.reader-mode #tab-analyzer,
body.reader-mode #tab-rainbow,
body.reader-mode #tab-wordlist,
body.reader-mode #tab-wordcloud {
display: none !important;
}
body.reader-mode textarea,
body.reader-mode .helper-row {
display: none;
}
body.reader-mode #at-a-glance-panel,
body.reader-mode #spotlight-panel,
body.reader-mode #difficult-panel {
display: none;
}
body.wordcloud-mode .layout {
flex-direction: column;
}
body.wordcloud-mode #source-panel {
flex-basis: 100%;
min-height: calc(100vh - 80px);
padding-bottom: 0;
}
body.wordcloud-mode #at-a-glance-panel,
body.wordcloud-mode #spotlight-panel,
body.wordcloud-mode #difficult-panel {
display: none;
}
body.wordcloud-mode #tab-analyzer,
body.wordcloud-mode #tab-rainbow,
body.wordcloud-mode #tab-wordlist,
body.wordcloud-mode #tab-reader {
display: none;
}
body.wordcloud-mode #tab-wordcloud {
display: flex;
}
.wordlist-view {
display: flex;
flex-direction: column;
gap: 16px;
}
.wordlist-toggle {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 14px;
border-radius: 12px;
border: 1px solid #e2e8f0;
background: #fff;
}
.toggle-switch {
position: relative;
width: 48px;
height: 24px;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
.toggle-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #cbd5f5;
transition: 0.2s ease;
border-radius: 999px;
}
.toggle-slider::before {
position: absolute;
content: '';
height: 18px;
width: 18px;
left: 3px;
top: 3px;
background-color: #fff;
border-radius: 50%;
transition: transform 0.2s ease;
box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}
.toggle-switch input:checked + .toggle-slider {
background: linear-gradient(135deg, #a855f7, #ec4899);
}
.toggle-switch input:checked + .toggle-slider::before {
transform: translateX(24px);
}
.wordlist-section {
background: #fff;
border-radius: 16px;
padding: 12px;
border: 1px solid #e2e8f0;
}
.wordlist-section h4 {
margin: 0 0 8px;
font-size: 0.95rem;
color: #0f172a;
}
.wordlist-chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.wordlist-chip {
padding: 6px 10px;
border-radius: 999px;
font-size: 0.85rem;
color: #fff;
border: none;
cursor: grab;
user-select: none;
box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.wordlist-chip.dragging {
opacity: 0.7;
cursor: grabbing;
}
.wordcloud-panel {
background: #fff;
border-radius: 24px;
padding: 24px;
border: 1px solid #e2e8f0;
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
overflow: hidden;
}
.wordcloud-panel .empty {
margin-bottom: 16px;
}
.wordcloud-stage {
flex: 1;
position: relative;
height: 100%;
overflow: hidden;
border-radius: 24px;
background: #fff;
padding: 16px;
box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.12);
display: flex;
justify-content: center;
align-items: center;
}
.toggle-pill {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 6px 10px;
border-radius: 999px;
background: #f1f5f9;
border: 1px solid #cbd5f5;
font-size: 0.85rem;
}
.toggle-pill input {
accent-color: #0ea5e9;
}
.highlight-text {
background: var(--reader-bg);
color: var(--reader-fg);
border: 1px solid #e2e8f0;
border-radius: 16px;
padding: 16px;
min-height: 160px;
line-height: var(--reader-line-height);
font-size: calc(1rem * var(--reader-scale));
letter-spacing: var(--reader-letter-spacing);
box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.05);
white-space: pre-wrap;
font-family: var(--reader-font);
}
.text-highlight {
padding: 2px 4px;
border-radius: 6px;
transition: background 0.2s ease, color 0.2s ease;
}
.text-highlight[data-active="false"] {
background: transparent !important;
color: inherit !important;
}
.badge-grid {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 16px;
}
.badge {
background: #0f172a;
color: #fff;
padding: 10px 14px;
border-radius: 14px;
font-size: 0.9rem;
letter-spacing: 0.02em;
display: flex;
align-items: center;
gap: 12px;
min-width: 200px;
cursor: grab;
}
.badge.dragging {
opacity: 0.75;
cursor: grabbing;
}
.badge-word {
font-weight: 600;
font-size: 1rem;
}
.dict-icon-link,
.noun-icon-link {
color: inherit;
text-decoration: none;
}
.dict-icon-link,
.noun-icon-link {
font-size: 1.2rem;
line-height: 1;
display: inline-flex;
}
.badge-extra {
display: inline-flex;
flex-direction: row;
align-items: center;
justify-content: center;
min-width: auto;
padding: 6px 12px;
font-size: 0.85rem;
}
.empty {
color: #94a3b8;
font-size: 0.9rem;
margin-top: 12px;
}
@media (max-width: 768px) {
header h1 { font-size: 1.8rem; }
textarea { min-height: 260px; }
}
