#emb-board {
    max-width: 1000px;
    margin: 0 auto;
    font-family: system-ui, sans-serif;
}

#emb-board h1 {
    text-align: center;
}

#emb-board .emb-tagline {
    text-align: center;
    color: #555;
}

.emb-identity-filter {
    margin: 0 0 14px;
}

.emb-identity-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.emb-identity-filter-row input {
    flex: 1;
    min-width: 220px;
}

#emb-board select {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    height: 44px;
    margin: 0;
    padding: 0 40px 0 12px;
    font-size: 16px;
    line-height: 44px;
    font-family: inherit;
    text-align: left;
    text-indent: 0;
    color: #1d2327;
    -webkit-text-fill-color: #1d2327;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%231d2327' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#emb-board select option {
    color: #1d2327;
    background-color: #fff;
    line-height: 1.4;
}

#emb-board select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 1px;
}

#emb-board input[type="text"],
#emb-board textarea {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

#emb-board label {
    display: block;
    margin-top: 15px;
}

.emb-risk {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #8a5a00;
}

.emb-editor {
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

.emb-editor-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.emb-editor-bar button {
    border: 0;
    background: transparent;
    min-width: 28px;
    height: 26px;
    padding: 0 4px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
}

.emb-editor-bar button:hover {
    background: #ececec;
}

.emb-editor-sep {
    width: 1px;
    background: #ddd;
    margin: 4px 6px;
}

.emb-editor-surface {
    min-height: 88px;
    padding: 10px 12px;
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
}

.emb-editor-surface:empty:before {
    content: 'Write your message here...';
    color: #888;
}

.emb-formatted,
.emb-thread-body,
.emb-thread-opener-body,
.emb-plain {
    white-space: pre-wrap;
    word-break: break-word;
}

.emb-formatted a,
.emb-thread-body a,
.emb-thread-opener-body a,
.emb-plain a,
.emb-window-body a {
    color: #0b6bcb;
    text-decoration: underline;
    word-break: break-all;
}

.emb-search-wrap {
    margin-bottom: 20px;
}

.emb-compose {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.emb-grid-2 {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr 1fr;
}

.emb-char-count {
    text-align: right;
    font-size: 12px;
    color: #666;
}

.emb-decrypt-limit {
    margin-top: 15px;
}

.emb-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
}

.emb-check input {
    width: auto;
}

.emb-decrypt-limit-wrap {
    margin-top: 10px;
}

.emb-decrypt-note {
    margin-top: 16px;
    padding: 10px 12px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 6px;
    white-space: normal;
}

.emb-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.emb-table th {
    padding: 14px;
    text-align: left;
    background: #f1f1f1;
}

.emb-msg-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.emb-msg-link:hover {
    color: #0d6efd;
}

.emb-message-row.is-focus {
    background: #fff6d6;
}

.emb-table td {
    padding: 12px;
}

.emb-actions {
    white-space: nowrap;
    width: 220px;
}

.emb-empty {
    padding: 30px;
    text-align: center;
    font-style: italic;
}

.emb-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 6px;
    color: #fff;
    font-size: 14px;
}

.emb-btn-primary {
    margin-top: 20px;
    padding: 14px 28px;
    font-size: 16px;
    background: #0073aa;
    border-radius: 8px;
}

.emb-btn-decrypt {
    background: #28a745;
}

.emb-btn-delete {
    background: #dc3545;
}

.emb-btn-manage {
    background: #0d6efd;
}

.emb-manage-panel {
    white-space: normal;
}

.emb-manage-panel h3 {
    margin: 0 0 12px;
}

.emb-manage-stats {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.emb-manage-stats li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.emb-manage-actions {
    margin-top: 16px;
}

.emb-manage-tool {
    margin: 14px 0;
    padding: 12px 0;
    border-top: 1px solid #eee;
}

.emb-manage-tool h4 {
    margin: 0 0 8px;
}

.emb-manage-tool > label,
.emb-manage-tool > input,
.emb-manage-tool > select {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.emb-manage-tool > input,
.emb-manage-tool > select {
    margin: 4px 0 10px;
}

.emb-manage-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.emb-manage-choice:has(input:checked) {
    border-color: #0d6efd;
    background: #f4f8ff;
}

.emb-manage-choice input[type="radio"] {
    width: auto;
    margin: 4px 0 0;
    flex: 0 0 auto;
}

.emb-manage-choice span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.emb-manage-choice small {
    color: #555;
    font-size: 13px;
}

.emb-manage-choice .emb-manage-limit {
    display: inline-block;
    width: 4.5em;
    margin: 0 4px;
    padding: 4px 6px;
}

.emb-manage-current {
    margin: 0 0 8px;
    color: #555;
}

.emb-btn-muted {
    background: #6c757d;
}

.emb-sort {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.emb-sort:hover {
    text-decoration: underline;
}

.emb-sort.is-active:after {
    content: ' ▲';
    font-size: 10px;
}

.emb-sort.is-active.is-desc:after {
    content: ' ▼';
}

.emb-expires-cell.emb-countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #b42318;
}

.emb-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.emb-pager[hidden] {
    display: none;
}

.emb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000000;
    align-items: center;
    justify-content: center;
}

.emb-modal:not([hidden]) {
    display: flex;
}

.emb-modal-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 460px;
    max-width: 92%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.emb-modal-card h2,
.emb-modal-card h3 {
    margin: 0 0 20px;
}

.emb-key-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    word-break: break-all;
}

.emb-modal-actions {
    display: flex;
    gap: 12px;
}

.emb-modal-actions .emb-btn {
    flex: 1;
    margin: 0;
    padding: 14px;
    font-size: 16px;
    border-radius: 8px;
}

#emb-modal-key,
#emb-manage-password {
    width: 100%;
    padding: 14px;
    font-size: 17px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.emb-window {
    position: fixed;
    display: flex;
    flex-direction: column;
    min-width: 280px;
    min-height: 180px;
    background: #fff;
    border: 1px solid #c5c5c5;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.emb-window-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #1d2327;
    color: #fff;
    cursor: move;
    user-select: none;
    flex: 0 0 auto;
}

.emb-window-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emb-window-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.emb-window-close:hover {
    background: #dc3545;
}

.emb-window-body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 15px;
    line-height: 1.45;
}

.emb-window-body .emb-key-results {
    width: 100%;
    border-collapse: collapse;
    white-space: normal;
}

.emb-window-body .emb-key-results th,
.emb-window-body .emb-key-results td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.emb-window-body .emb-key-results .emb-plain {
    white-space: pre-wrap;
    font-family: ui-monospace, monospace;
}

.emb-window-resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
}

@media (max-width: 640px) {
    .emb-grid-2 {
        grid-template-columns: 1fr;
    }
}
