.syllable-slow-reader {
    color: #26384a;
    background: linear-gradient(145deg, #f0f9ff 0%, #eef2ff 52%, #f8fafc 100%);
    align-items: stretch !important;
    justify-content: flex-start !important;
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
}
.reading-custom-maker { padding: 22px; border: 2px solid #dbeafe; border-radius: 30px; }
.ssr-panel { width: min(100%, 900px); min-height: 100%; margin: 0 auto; display: grid; align-content: start; gap: 14px; }
.ssr-field { position: relative; padding: 16px 18px; border: 2px solid #dbeafe; border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 10px 24px rgba(37,99,235,.08); }
.ssr-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.ssr-field-heading label, .ssr-field-heading strong { font-weight: 900; }
.ssr-field-heading span { color: #64748b; font-size: .78rem; font-weight: 800; }
.ssr-input-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(128px,160px); gap: 10px; align-items: stretch; }
#ssr-text-input { box-sizing: border-box; width: 100%; min-height: 82px; padding: 13px 15px; resize: vertical; border: 2px solid #cbd5e1; border-radius: 17px; color: #1e293b; background: #f8fafc; font: 800 1.05rem/1.55 'Noto Sans KR', sans-serif; }
#ssr-text-input:focus { outline: 4px solid rgba(59,130,246,.16); border-color: #3b82f6; background: #fff; }
.ssr-play-stack { position: relative; display: flex; min-height: 82px; }
.ssr-settings { position: absolute; right: -8px; top: -12px; z-index: 2; width: 38px; height: 38px; border: 2px solid #dbeafe; border-radius: 999px; color: #334155; background: #fff; box-shadow: 0 10px 20px rgba(37,99,235,.14); cursor: pointer; font: 900 1rem/1 'Noto Sans KR', sans-serif; }
.ssr-settings[aria-expanded="true"] { color: #fff; background: #2563eb; border-color: #2563eb; }
.ssr-play { width: 100%; min-height: 82px; padding: 12px 18px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 20px; color: #fff; background: linear-gradient(110deg,#2563eb,#4f46e5); box-shadow: 0 12px 24px rgba(37,99,235,.24); cursor: pointer; font-family: inherit; }
.ssr-play:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.ssr-play[aria-pressed="true"] { background: linear-gradient(110deg,#e11d48,#be123c); }
#ssr-play-icon { font-size: 1.45rem; line-height: 1; }
#ssr-play-text { font-size: clamp(1.05rem,2vw,1.35rem); font-weight: 900; }
.ssr-settings-popup { position: absolute; right: 18px; top: 105px; z-index: 15; width: min(330px, calc(100% - 36px)); }
.ssr-settings-card { padding: 14px; border: 2px solid #bfdbfe; border-radius: 20px; background: #fff; box-shadow: 0 18px 40px rgba(15,23,42,.18); }
.ssr-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: #26384a; font-size: .95rem; }
.ssr-settings-head button { width: 32px; height: 32px; border: 0; border-radius: 999px; color: #475569; background: #e2e8f0; cursor: pointer; font-size: 1.2rem; font-weight: 900; }
.ssr-gap-control { min-height: 54px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.ssr-gap-control input { width: 100%; min-height: 32px; accent-color: #2563eb; cursor: pointer; }
#ssr-gap-display { color: #2563eb; font-size: .8rem; white-space: nowrap; }
.ssr-board-wrap, .ssr-history { min-height: 146px; padding: 16px; border: 2px solid #dbeafe; border-radius: 25px; background: rgba(255,255,255,.96); box-shadow: 0 10px 24px rgba(37,99,235,.08); }
.ssr-board-label { margin: 0 0 11px; color: #64748b; font-size: .82rem; font-weight: 900; }
.ssr-board { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; max-height: 176px; overflow-y: auto; padding: 3px; }
.ssr-empty { width: 100%; padding: 28px 8px; color: #64748b; font-weight: 800; text-align: center; }
.ssr-token { box-sizing: border-box; min-width: 48px; min-height: 52px; padding: 6px 10px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #cbd5e1; border-radius: 16px; color: #1e293b; background: #f8fafc; font: 900 1.35rem/1 'Noto Sans KR', sans-serif; box-shadow: 0 3px 0 #e2e8f0; transition: transform .16s ease, color .16s ease, background .16s ease, border-color .16s ease; }
button.ssr-token { cursor: pointer; }
button.ssr-token:active { transform: scale(.94); }
.ssr-token.punctuation { min-width: 34px; padding-inline: 5px; color: #64748b; border-color: transparent; background: transparent; box-shadow: none; }
.ssr-space { width: 13px; min-height: 52px; position: relative; }
.ssr-space::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #cbd5e1; transform: translate(-50%,-50%); }
.ssr-token.active { color: #fff; border-color: #2563eb; background: #2563eb; box-shadow: 0 7px 16px rgba(37,99,235,.3); transform: translateY(-3px) scale(1.08); }
.ssr-status { margin: 0; color: #64748b; font-weight: 800; }
.ssr-status[data-tone="playing"] { color: #1d4ed8; }
.ssr-status[data-tone="success"] { color: #15803d; }
.ssr-status[data-tone="error"] { color: #be123c; }
.ssr-history { display: grid; gap: 12px; }
.ssr-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ssr-history h3 { margin: 0; color: #26384a; font-size: 1.1rem; font-weight: 900; }
.ssr-history-tabs { display: inline-flex; gap: 6px; padding: 4px; border-radius: 999px; background: #eef2ff; }
.ssr-history-tabs button { min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; color: #475569; background: transparent; cursor: pointer; font: 900 .86rem/1 'Noto Sans KR', sans-serif; }
.ssr-history-tabs button.active { color: #fff; background: #2563eb; box-shadow: 0 8px 16px rgba(37,99,235,.22); }
.ssr-history-list { display: grid; gap: 10px; max-height: 286px; overflow-y: auto; padding-right: 2px; }
.ssr-history-empty { padding: 22px 10px; color: #64748b; font-weight: 800; text-align: center; border: 2px dashed #dbeafe; border-radius: 18px; background: #f8fafc; }
.ssr-history-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 12px; border: 2px solid #e0e7ff; border-radius: 20px; background: #fff; }
.ssr-history-main { display: grid; gap: 8px; min-width: 0; }
.ssr-history-text { margin: 0; color: #1e293b; font-size: 1.08rem; font-weight: 900; word-break: keep-all; overflow-wrap: anywhere; }
.ssr-history-sub { color: #64748b; font-size: .75rem; font-weight: 800; }
.ssr-history-tokens { display: flex; flex-wrap: wrap; gap: 5px; }
.ssr-history-token { min-width: 32px; min-height: 34px; padding: 4px 7px; border: 1.5px solid #cbd5e1; border-radius: 11px; color: #1e293b; background: #f8fafc; cursor: pointer; font: 900 .98rem/1 'Noto Sans KR', sans-serif; }
.ssr-history-token:active { transform: scale(.94); }
.ssr-history-actions { display: grid; grid-template-columns: 1fr; gap: 7px; min-width: 78px; }
.ssr-history-actions button { min-height: 34px; padding: 7px 10px; border: 0; border-radius: 12px; cursor: pointer; font: 900 .8rem/1 'Noto Sans KR', sans-serif; }
.ssr-history-play { color: #fff; background: #2563eb; }
.ssr-history-remove { color: #991b1b; background: #fee2e2; }
.ssr-history-pin { color: #166534; background: #dcfce7; }
.ssr-history-pin:disabled { color: #64748b; background: #e2e8f0; cursor: default; }

@media (max-width: 760px) {
    .reading-custom-maker { padding: 12px; border-radius: 22px; }
    .ssr-panel { gap: 9px; }
    .ssr-field, .ssr-board-wrap, .ssr-history { padding: 12px; border-radius: 19px; }
    .ssr-input-row { grid-template-columns: 1fr; }
    #ssr-text-input { min-height: 72px; }
    .ssr-play-stack { min-height: 62px; }
    .ssr-play { min-height: 62px; border-radius: 17px; }
    .ssr-settings-popup { top: auto; right: 12px; left: 12px; width: auto; }
    .ssr-board-wrap { min-height: 126px; }
    .ssr-board { max-height: 154px; gap: 6px; }
    .ssr-token { min-width: 44px; min-height: 48px; padding: 5px 8px; border-radius: 14px; font-size: 1.2rem; }
    .ssr-space { width: 9px; min-height: 48px; }
    .ssr-history-head { align-items: stretch; flex-direction: column; }
    .ssr-history-item { grid-template-columns: 1fr; }
    .ssr-history-actions { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 430px) {
    .ssr-field-heading { align-items: flex-start; }
    .ssr-field-actions { justify-content: stretch; }
    .ssr-field-actions button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .ssr-token { transition: none; }
    .ssr-token.active { transform: none; }
}
