/* Dedicated accent keyboard */
.keyboard-page-link {display:block;margin-top:14px;text-align:center;font-size:12px;font-weight:600}
.keyboard-page-container {max-width:1120px;padding-top:22px;padding-bottom:40px}
.keyboard-page .breadcrumb {font-size:12px;display:flex;gap:10px;margin-bottom:24px}
.keyboard-intro {margin:0 0 28px}
.keyboard-intro h1 {font-size:40px;letter-spacing:-1.4px;font-weight:600;line-height:1.2;margin:10px 0 12px}
.keyboard-intro h1 em {font-family:Georgia,serif;font-weight:400;color:var(--accent-primary)}
.keyboard-intro>p:last-child {color:var(--text-secondary);font-size:15px}
.keyboard-workspace {background:white;border:1px solid var(--border-subtle);border-radius:15px;box-shadow:0 3px 15px #243d2b05}
.keyboard-editor {padding:26px}
.keyboard-editor-heading {display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.keyboard-editor-heading label {font-size:16px;font-weight:600}
.keyboard-textarea {display:block;width:100%;min-height:170px;max-height:550px;resize:vertical;padding:18px 20px;border:1px solid var(--border-medium);border-radius:9px;background:#fcfdf9;color:var(--text-primary);font-family:var(--font-char);font-size:23px;line-height:1.65}
.keyboard-textarea::placeholder {font-family:var(--font-ui);font-size:16px;color:var(--text-muted)}
.keyboard-textarea:disabled {opacity:1;color:var(--text-primary);-webkit-text-fill-color:var(--text-primary);cursor:default}
.keyboard-textarea:disabled::placeholder {-webkit-text-fill-color:var(--text-muted);opacity:1}
.keyboard-editor-toolbar {display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:14px}
.keyboard-editor-toolbar>span {font-size:12px;color:var(--text-secondary)}
.keyboard-editor-actions {display:flex;gap:8px}
.keyboard-editor-actions .btn {min-height:44px;font-size:13px}
.keyboard-editor-actions .btn-primary {min-width:130px}
.keyboard-section-heading {display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px}
.keyboard-section-heading h2 {font-size:16px;font-weight:600;letter-spacing:-.3px}
.keyboard-section-heading p,.keyboard-section-heading>span {color:var(--text-secondary);font-size:12px;margin-top:6px}
.keyboard-section-heading .btn {min-height:44px;flex-shrink:0;background:white;font-size:12px}
#keyboard-case.active {background:var(--accent-primary);border-color:var(--accent-primary);color:white}
.keyboard-variants {display:grid;grid-template-columns:repeat(auto-fill,minmax(51px,1fr));gap:7px}
.keyboard-page [hidden] {display:none!important}
.keyboard-accent-key {min-height:57px;min-width:0;border:1px solid #cbdac5;border-radius:7px;background:white;color:var(--accent-primary);font:27px/1.6 var(--font-char);box-shadow:0 2px 0 #dce5d6;cursor:pointer}
.keyboard-accent-key:hover {background:#e5efdf;border-color:#78a189}
.keyboard-keys-panel {position:relative;padding:24px 26px 28px;background:#f4f7f0;border-top:1px solid var(--border-subtle);border-radius:0 0 15px 15px}
.keyboard-keys-panel .keyboard-section-heading {margin-bottom:20px}
.keyboard-rows {max-width:800px;margin:auto}
.keyboard-row {display:flex;gap:7px;justify-content:center;margin-bottom:8px}
.keyboard-row:last-child {margin-bottom:0}
.keyboard-key {display:flex;justify-content:center;align-items:center;gap:6px;border:1px solid #d4ded0;background:#fafbf8;box-shadow:0 3px 0 #e5eadf;border-radius:7px;min-width:0;width:calc((100% - 63px)/10);height:49px;font:21px var(--font-char);color:var(--text-primary);cursor:pointer}
.keyboard-key:hover {background:#edf5e6;border-color:#8aac83}
.keyboard-letter-key {position:relative;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation}
.keyboard-letter-key::after {content:'';position:absolute;right:7px;top:7px;width:4px;height:4px;border-radius:50%;background:#8aac83}
.keyboard-letter-key[aria-expanded="true"] {background:#e1edde;border-color:var(--accent-primary)}
.keyboard-number {font-size:16px}
.keyboard-accent-popup {position:absolute;z-index:30;width:min(420px,100%);padding:12px;background:white;border:1px solid #b4c9af;border-radius:12px;box-shadow:0 8px 30px #233c3429;isolation:isolate}
.keyboard-popup-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;color:var(--text-primary);font-size:12px}
.keyboard-popup-heading button {display:grid;place-items:center;min-width:36px;min-height:36px;border:0;border-radius:6px;background:var(--accent-light);color:var(--accent-primary);font-size:22px;cursor:pointer}
.keyboard-popup-options {max-height:180px;max-height:min(180px,35dvh);overflow-y:auto;overscroll-behavior:contain;padding:3px 4px 5px;scrollbar-width:thin}
.keyboard-accent-popup .keyboard-variants {grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:6px}
.keyboard-accent-popup .keyboard-accent-key {min-height:46px;font-size:25px;touch-action:manipulation}
.keyboard-key:active,.keyboard-accent-key:active {transform:translateY(2px);box-shadow:none}
.keyboard-control {width:auto;flex:1;padding-inline:10px}
.keyboard-control span,.keyboard-space {font:12px var(--font-ui)}
.keyboard-space {flex:3}
.keyboard-guide {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px;padding:34px 0 0}
.keyboard-guide h2 {font:22px Georgia,serif;letter-spacing:-.3px;margin:12px 0}
.keyboard-guide p {font-size:13px;color:var(--text-secondary);line-height:1.8}
.keyboard-empty {grid-column:1/-1;font-size:13px;color:var(--text-secondary)}
.keyboard-noscript {padding:20px;font-size:14px}
.keyboard-mobile-help {display:none}
/* Keep the editor and every key together below the sticky desktop header.
   Long text scrolls inside the editor instead of pushing the keyboard down. */
@media(min-width:681px) {
  .keyboard-workspace {
    display:grid;
    grid-template-rows:minmax(0,1fr) auto;
    height:min(660px,calc(100dvh - var(--header-height) - 24px));
    min-height:500px;
    scroll-margin-top:calc(var(--header-height) + 12px);
  }
  .keyboard-editor {display:flex;flex-direction:column;min-height:0;padding:14px 24px}
  .keyboard-editor-heading {margin-bottom:8px}
  .keyboard-textarea {flex:1;min-height:70px;height:0;max-height:none;resize:none;overflow-y:auto;padding:12px 16px;font-size:21px}
  .keyboard-editor-toolbar {margin-top:8px;gap:10px;flex-shrink:0}
  .keyboard-editor-actions .btn {min-height:38px;padding-block:8px}
  .keyboard-keys-panel {padding:14px 24px 18px}
  .keyboard-keys-panel .keyboard-section-heading {margin-bottom:12px;gap:12px}
  .keyboard-section-heading .btn {min-height:38px;padding-block:8px}
  .keyboard-row {margin-bottom:6px}
  .keyboard-key {height:clamp(36px,5dvh,49px)}
}
@media(max-width:1050px) {
  .header-search-btn .search-hint-text {display:none}
  .header-container {gap:16px}
  .main-nav {gap:0}
  .main-nav a {padding-inline:9px;font-size:12px}
}
@media(max-width:680px) {
  .keyboard-page-container {padding-top:18px}
  .keyboard-intro {margin-bottom:22px}
  .keyboard-intro h1 {font-size:32px}
  .keyboard-intro>p:last-child {font-size:14px}
  .keyboard-workspace {display:grid;grid-template-rows:minmax(0,1fr) auto;height:min(660px,calc(100svh - var(--header-height) - 16px));min-height:420px;scroll-margin-top:calc(var(--header-height) + 8px)}
  .keyboard-editor {display:flex;flex-direction:column;min-height:0;padding:10px 12px}
  .keyboard-editor-heading {margin-bottom:6px;gap:8px}
  .keyboard-editor-heading label {font-size:14px}
  .keyboard-editor-heading .subtle-badge {font-size:9px;padding:3px 6px}
  .keyboard-keys-panel {padding:10px 12px 12px}
  .keyboard-textarea {flex:1;height:0;min-height:48px;max-height:none;resize:none;overflow-y:auto;padding:10px 12px;font-size:18px}
  .keyboard-textarea::placeholder {font-size:14px}
  .keyboard-editor-toolbar {flex-wrap:nowrap;flex-shrink:0;gap:6px;margin-top:8px}
  .keyboard-editor-toolbar>span {font-size:10px;white-space:nowrap}
  .keyboard-editor-actions {gap:4px}
  .keyboard-editor-actions .btn {padding:6px;min-width:0;min-height:36px;font-size:11px}
  .keyboard-editor-actions .btn-primary {min-width:0}
  .keyboard-section-heading {align-items:flex-start;gap:10px}
  .keyboard-section-heading h2 {font-size:15px}
  .keyboard-section-heading p {font-size:11px;margin-top:4px}
  .keyboard-section-heading .btn {padding:6px 8px;min-height:36px;font-size:11px}
  .keyboard-desktop-help {display:none}
  .keyboard-mobile-help {display:inline}
  .keyboard-variants {grid-template-columns:repeat(auto-fill,minmax(42px,1fr));gap:6px}
  .keyboard-accent-key {min-height:51px;font-size:26px}
  .keyboard-keys-panel .keyboard-section-heading {gap:8px;margin-bottom:8px}
  .keyboard-row {gap:4px;margin-bottom:4px}
  .keyboard-key {width:calc((100% - 36px)/10);height:clamp(32px,6svh,44px);font-size:17px;border-radius:5px}
  .keyboard-control {width:auto;padding-inline:4px}
  .keyboard-control span {display:none}
  .keyboard-space {font-size:12px}
  .keyboard-letter-key::after {right:4px;top:5px;width:3px;height:3px}
  .keyboard-guide {grid-template-columns:1fr;gap:24px}
}
@media(max-width:380px) {
  .keyboard-page-container {padding-inline:12px}
  .keyboard-keys-panel {padding-inline:8px}
  .keyboard-row {gap:3px}
  .keyboard-key {width:calc((100% - 27px)/10)}
  .keyboard-control {width:auto}
}
