:root { color-scheme: light dark; --tc-color-accent: #935C2B; }
@media (prefers-color-scheme: dark) {
  :root { --tc-color-accent: #E0B07A; --tc-color-on-accent: #211a14; }
}
tc-page { --tc-color-background: #faf7ef; --tc-color-primary: #30281f; }
.masthead { display: flex; align-items: center; gap: .75rem; padding-block: .65rem 1.15rem; }
.masthead img { border-radius: .65rem; }
#app > tc-card { width: min(100%,32rem); margin: clamp(2rem,8vh,5rem) auto; padding: clamp(1.25rem,4vw,2.2rem); color: var(--tc-color-primary); background: #fffcf5; border: 1px solid #ded5c5; box-shadow: 0 .5rem 2rem #5537150c; }
#app > tc-card h2 { font-size: clamp(1.65rem,4vw,2.2rem); }
#app > tc-card p:empty { display: none; }
#app > tc-card label { display: grid; gap: .45rem; }
#app > tc-card input { font: inherit; border: 1px solid #aa9982; border-radius: .6rem; padding: .65rem; color: inherit; background: transparent; }
#app > tc-card tc-button { align-self: start; justify-self: start; }
#app > tc-card canvas { align-self: center; width: min(100%,18rem); }
@media (prefers-color-scheme: dark) {
  tc-page { --tc-color-background: #201d19; --tc-color-primary: #eee7dc; }
  #app > tc-card { background: #2c2822; border-color: #51473b; }
}
header { border-bottom: 1px solid var(--tc-color-stroke); margin-bottom: 1.5rem; }
h1, h2 { font-family: ui-serif, Georgia, serif; }
h1 { color: var(--tc-color-accent); }
main, form, section, .shelf { display: grid; gap: 1rem; min-width: 0; }
ul { list-style: none; padding: 0; margin: 0; }
li { padding-block: .75rem; border-bottom: 1px solid var(--tc-color-stroke); overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
canvas { max-width: 100%; height: auto; image-rendering: pixelated; }
input { max-width: 100%; min-width: 0; box-sizing: border-box; }
summary { cursor: pointer; padding: .8rem 0; }
.reader { font-family: Georgia, serif; line-height: 1.65; }
.reader[data-theme=Paper] { background: #f6efdd; color: #332c23; }
.reader[data-theme=Quiet] { background: #25221e; color: #e7e2d7; }
.reader[data-theme=Modern] tc-reading-passage, .reader[data-theme=Modern] { font-family: system-ui,sans-serif; }
.reader[data-spacing=Compact] { line-height: 1.35; }
.reader[data-spacing=Open] { line-height: 1.95; }
.reader-tools, .reader dialog { font-family: system-ui,sans-serif; }
.reader tc-reading-passage { display: block; margin: 1em 0; white-space: pre-wrap; }
.reader [role=heading] { font-weight: bold; }
.reader dialog { width: min(26rem, 85vw); border: 1px solid var(--tc-color-stroke); border-radius: 1rem; }
.reader textarea { display: block; width: 100%; min-height: 5rem; box-sizing: border-box; }
.site { margin: 0; color: var(--tc-color-secondary); }
[hidden] { display: none !important; }

.link-menu { justify-self: end; font-size: .9rem; }
.link-menu summary { padding: .35rem; }
tc-continue-card > button { display: grid; gap: .4rem; text-align: start; }
tc-continue-card strong { font: 1.45rem Georgia,serif; }

.reader[data-size=Small] tc-reading-passage { font-size: 1rem; }
.reader[data-size=Medium] tc-reading-passage { font-size: 1.15rem; }
.reader[data-size=Large] tc-reading-passage { font-size: 1.4rem; }
.reader[data-size="Extra large"] tc-reading-passage { font-size: 1.7rem; }
.reader[data-spacing] tc-reading-passage { line-height: inherit; }

.staging-download { margin: 1rem auto 2rem; max-width: 91rem; padding-inline: 1.25rem; }
.staging-download a { color: var(--tc-color-accent); }
