.devtool-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 52px 0 64px;
}

.devtool-intro {
    margin-bottom: 28px;
    text-align: center;
}

.devtool-intro h1 {
    margin: 0;
    color: #3b1020;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.devtool-intro > p {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.devtool-privacy-note {
    width: fit-content;
    margin: 14px auto 0;
    padding: 7px 12px;
    border: 1px solid #efd9df;
    border-radius: 999px;
    background: #fff;
    color: #76515e;
    font-size: 12px;
}

.base64-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(75, 18, 39, 0.07);
}

.base64-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--border);
    background: #fffafb;
}

.base64-mode__button {
    position: relative;
    min-height: 76px;
    padding: 13px 18px;
    border: 0;
    background: transparent;
    color: #71505c;
    cursor: pointer;
    font-weight: 800;
    font-size: 15px;
}

.base64-mode__button + .base64-mode__button {
    border-left: 1px solid var(--border);
}

.base64-mode__button small {
    display: block;
    margin-top: 5px;
    color: #a1848e;
    font-size: 11px;
    font-weight: 600;
}

.base64-mode__button.is-active {
    background: #fff;
    color: var(--primary);
}

.base64-mode__button.is-active::after {
    content: "";
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--primary);
}


.base64-options {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.base64-options__label {
    color: #4c1c2c;
    font-size: 13px;
    font-weight: 800;
}

.base64-charset-select {
    min-width: 150px;
    height: 36px;
    padding: 0 34px 0 11px;
    border: 1px solid #dec6cf;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #4c1c2c;
    font-size: 13px;
    cursor: pointer;
}

.base64-charset-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(159, 18, 57, 0.08);
}

.base64-options__note {
    color: #9a7d87;
    font-size: 11px;
}

.base64-workspace {
    padding: 26px;
}

.base64-panel {
    overflow: hidden;
    border: 1px solid #ead5dc;
    border-radius: 13px;
    background: #fff;
}

.base64-panel--result {
    background: #fffbfc;
}

.base64-panel__header {
    min-height: 62px;
    padding: 11px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f0dfe4;
    background: #fffafb;
}

.base64-panel__header strong {
    display: block;
    color: #4c1c2c;
    font-size: 14px;
}

.base64-panel__hint {
    display: block;
    margin-top: 3px;
    color: #9a7d87;
    font-size: 11px;
}

.base64-panel__tools {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.base64-count {
    color: #9a7d87;
    font-size: 11px;
}

.text-button {
    padding: 6px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.text-button:hover:not(:disabled) {
    background: #fff1f2;
}

.text-button:disabled {
    color: #c9b5bc;
    cursor: default;
}

.base64-textarea {
    display: block;
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 17px 18px;
    border: 0;
    outline: 0;
    background: #fff;
    color: #332029;
    font: 14px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.base64-textarea--result {
    background: #fffbfc;
}

.base64-textarea:focus {
    box-shadow: inset 0 0 0 2px rgba(159, 18, 57, 0.12);
}

.base64-textarea::placeholder {
    color: #c1aab2;
}

.base64-action-row {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.base64-convert-button {
    min-width: 220px;
    min-height: 48px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 7px 18px rgba(159, 18, 57, 0.18);
}

.base64-convert-button:hover {
    background: var(--primary-hover);
}


.base64-message {
    margin: 0 26px 26px;
    padding: 12px 14px;
    border: 1px solid #efb3c2;
    border-radius: 9px;
    background: #fff5f7;
    color: var(--danger);
    font-size: 13px;
}

.base64-message.is-success {
    border-color: #bad7c8;
    background: #f3fbf6;
    color: #246642;
}

.is-hidden {
    display: none !important;
}

.devtool-guide {
    margin-top: auto;
    padding: 62px 20px 72px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.devtool-guide__inner {
    width: min(1080px, 100%);
    margin: 0 auto;
}

.devtool-guide__lead {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.devtool-guide__lead h2 {
    margin: 0;
    color: #3b1020;
    font-size: 25px;
}

.devtool-guide__lead p {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.devtool-guide__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.devtool-guide__card {
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fffafb;
}

.devtool-guide__card strong {
    color: #4c1c2c;
    font-size: 14px;
}

.devtool-guide__card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

/* DevToolsは現時点でメニューが1行のため、ImgToolsと同じヘッダー高の中で中央配置する */
.global-nav__row {
    align-items: center;
}

.global-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
    .devtool-page {
        width: min(100% - 24px, 1180px);
        padding: 34px 0 44px;
    }

    .devtool-intro > p {
        font-size: 14px;
    }

    .base64-mode__button {
        min-height: 68px;
        padding-inline: 8px;
        font-size: 13px;
    }

    .base64-workspace {
        padding: 15px;
    }

    .base64-panel__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .base64-panel__tools {
        width: 100%;
        justify-content: space-between;
    }

    .base64-textarea {
        min-height: 190px;
    }

    .base64-action-row {
        min-height: 72px;
    }

    .base64-convert-button {
        min-width: 0;
        flex: 1 1 auto;
    }

    .base64-message {
        margin: 0 15px 15px;
    }

    .devtool-guide {
        padding: 48px 16px 56px;
    }

    .devtool-guide__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .base64-options {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 14px 18px;
    }

    .base64-options__note {
        width: 100%;
    }
}




/* DevTools footer: use the same three-column layout as ImgTools */
.global-footer__group,
.global-footer__group a {
    text-align: left;
}

.global-footer__bottom {
    text-align: center;
}

/* Base64 options */
.base64-options {
    flex-wrap: wrap;
}

.base64-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.base64-option + .base64-option {
    margin-left: 18px;
}

.base64-option.is-hidden {
    display: none;
}

@media (max-width: 760px) {
    .base64-option {
        width: 100%;
        flex-wrap: wrap;
    }

    .base64-option + .base64-option {
        margin-left: 0;
    }
}


/* JSON tool */
.json-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(75, 18, 39, 0.07);
}

.json-options {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.json-options__label {
    color: #4c1c2c;
    font-size: 13px;
    font-weight: 800;
}

.json-indent-select {
    min-width: 150px;
    height: 36px;
    padding: 0 34px 0 11px;
    border: 1px solid #dec6cf;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #4c1c2c;
    font-size: 13px;
    cursor: pointer;
}

.json-indent-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(159, 18, 57, 0.08);
}

.json-options__note {
    color: #9a7d87;
    font-size: 11px;
}

.json-workspace {
    padding: 26px;
}

.json-panel {
    overflow: hidden;
    border: 1px solid #ead5dc;
    border-radius: 13px;
    background: #fff;
}

.json-panel--result {
    background: #fffbfc;
}

.json-panel__header {
    min-height: 62px;
    padding: 11px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f0dfe4;
    background: #fffafb;
}

.json-panel__header strong {
    display: block;
    color: #4c1c2c;
    font-size: 14px;
}

.json-panel__hint {
    display: block;
    margin-top: 3px;
    color: #9a7d87;
    font-size: 11px;
}

.json-panel__tools {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.json-count {
    color: #9a7d87;
    font-size: 11px;
}

.json-editor {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 220px;
    background: #fff;
}

.json-editor--result {
    background: #fffbfc;
}

.json-line-numbers {
    overflow: hidden;
    padding: 17px 9px 17px 0;
    border-right: 1px solid #f0dfe4;
    background: #fffafb;
    color: #b89ca6;
    font: 12px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    text-align: right;
    white-space: pre;
    user-select: none;
}

.json-textarea {
    display: block;
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 17px 18px;
    border: 0;
    outline: 0;
    background: #fff;
    color: #332029;
    font: 14px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre;
    tab-size: 4;
}

.json-textarea--result {
    background: #fffbfc;
}

.json-textarea:focus {
    box-shadow: inset 0 0 0 2px rgba(159, 18, 57, 0.12);
}

.json-textarea::placeholder {
    color: #c1aab2;
}

.json-action-row {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.json-action-button {
    min-width: 145px;
    min-height: 48px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dec6cf;
    border-radius: 10px;
    background: #fff;
    color: #4c1c2c;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.json-action-button:hover {
    border-color: var(--primary);
    background: #fff7f9;
}

.json-action-button.is-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 7px 18px rgba(159, 18, 57, 0.18);
}

.json-action-button.is-primary:hover {
    background: var(--primary-hover);
}

.json-status {
    margin: 0 26px 26px;
    padding: 12px 14px;
    border: 1px solid #efb3c2;
    border-radius: 9px;
    background: #fff5f7;
    color: var(--danger);
    font-size: 13px;
}

.json-status.is-success {
    border-color: #bad7c8;
    background: #f3fbf6;
    color: #246642;
}

@media (max-width: 760px) {
    .json-options {
        padding: 12px 15px;
        flex-wrap: wrap;
    }

    .json-options__note {
        width: 100%;
    }

    .json-workspace {
        padding: 15px;
    }

    .json-panel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .json-panel__tools {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .json-action-row {
        padding: 16px 0;
    }

    .json-action-button {
        min-width: 0;
        flex: 1 1 130px;
    }

    .json-editor {
        grid-template-columns: 38px minmax(0, 1fr);
    }
}


/* URL encode/decode */
.url-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(75, 18, 39, 0.07);
}

.url-options {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.url-options__label {
    color: #4c1c2c;
    font-size: 13px;
    font-weight: 800;
}

.url-options__select {
    min-width: 190px;
    height: 36px;
    padding: 0 34px 0 11px;
    border: 1px solid #dec6cf;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #4c1c2c;
    font-size: 13px;
}

.url-options__select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(159, 18, 57, 0.08);
}

.url-options__note {
    color: #9a7d87;
    font-size: 11px;
}

.url-workspace {
    padding: 26px;
}

.url-panel {
    overflow: hidden;
    border: 1px solid #ead5dc;
    border-radius: 13px;
    background: #fff;
}

.url-panel--result {
    background: #fffbfc;
}

.url-panel__header {
    min-height: 62px;
    padding: 11px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f0dfe4;
    background: #fffafb;
}

.url-panel__header strong {
    display: block;
    color: #4c1c2c;
    font-size: 14px;
}

.url-panel__hint {
    display: block;
    margin-top: 3px;
    color: #9a7d87;
    font-size: 11px;
}

.url-panel__tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.url-count {
    color: #9a7d87;
    font-size: 11px;
}

.url-textarea {
    display: block;
    width: 100%;
    min-height: 190px;
    resize: vertical;
    padding: 18px;
    border: 0;
    outline: 0;
    background: #fff;
    color: #332029;
    font: 14px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.url-textarea--result {
    background: #fffbfc;
}

.url-textarea:focus {
    box-shadow: inset 0 0 0 2px rgba(159, 18, 57, 0.12);
}

.url-textarea::placeholder {
    color: #c1aab2;
}

.url-action-row {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.url-action-button {
    min-width: 220px;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    box-shadow: 0 7px 18px rgba(159, 18, 57, 0.18);
}

.url-action-button:hover {
    background: var(--primary-hover);
}

.url-status {
    margin: 0 26px 26px;
    padding: 12px 14px;
    border: 1px solid #efb3c2;
    border-radius: 9px;
    background: #fff5f7;
    color: var(--danger);
    font-size: 13px;
}

.url-status.is-success {
    border-color: #bad7c8;
    background: #f3fbf6;
    color: #246642;
}

@media (max-width: 760px) {
    .url-options {
        padding: 12px 15px;
        flex-wrap: wrap;
    }

    .url-options__note {
        width: 100%;
    }

    .url-workspace {
        padding: 15px;
    }

    .url-panel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .url-panel__tools {
        width: 100%;
        justify-content: flex-end;
    }

    .url-action-row {
        padding: 16px 0;
    }

    .url-action-button {
        width: 100%;
    }
}

/* ------------------------------------------------------------
 * JWT Decoder
 * ------------------------------------------------------------ */
.jwt-card {
    max-width: 980px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(72, 16, 36, 0.08);
}

.jwt-input-panel {
    padding: 24px;
    background: #fff;
}

.jwt-panel__header,
.jwt-result-panel__title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.jwt-panel__header strong,
.jwt-result-panel__title strong {
    display: block;
    color: #4d2433;
    font-size: 15px;
}

.jwt-panel__hint,
.jwt-result-panel__title span {
    display: block;
    margin-top: 4px;
    color: #927783;
    font-size: 12px;
}

.jwt-panel__tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.jwt-count {
    color: #9b808a;
    font-size: 12px;
    white-space: nowrap;
}

.jwt-textarea {
    width: 100%;
    min-height: 168px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    color: #342229;
    font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.jwt-textarea:focus {
    border-color: rgba(159, 18, 57, 0.55);
    box-shadow: 0 0 0 3px rgba(159, 18, 57, 0.08);
}

.jwt-textarea::placeholder {
    color: #baa5ad;
}

.jwt-action-row {
    display: flex;
    justify-content: center;
    padding: 18px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #fffafb;
}

.jwt-action-button {
    min-width: 230px;
    min-height: 46px;
    padding: 11px 24px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition: opacity .2s ease, transform .2s ease;
}

.jwt-action-button:hover {
    opacity: .9;
}

.jwt-action-button:active {
    transform: translateY(1px);
}

.jwt-status {
    margin: 18px 24px 0;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.6;
}

.jwt-status.is-success {
    border: 1px solid #b9dfc7;
    background: #f1fbf4;
    color: #27643b;
}

.jwt-status.is-error {
    border: 1px solid #efc1ca;
    background: #fff5f6;
    color: #9f1239;
}

.jwt-results {
    padding: 24px;
}

.jwt-result-panel + .jwt-result-panel {
    margin-top: 22px;
}

.jwt-result-panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.jwt-result-panel__title {
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #fffafb;
}

.jwt-code {
    min-height: 92px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    color: #342229;
    font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.jwt-signature {
    padding: 16px;
    color: #5b3b47;
    font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    overflow-wrap: anywhere;
}

.jwt-signature-note {
    margin: 0;
    padding: 0 16px 16px;
    color: #9a717e;
    font-size: 12px;
    line-height: 1.7;
}

.jwt-claims {
    margin: 0 16px 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.jwt-claims__title {
    display: block;
    margin-bottom: 10px;
    color: #69414f;
    font-size: 13px;
}

.jwt-claims__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.jwt-claim {
    padding: 12px;
    border: 1px solid #eadde2;
    border-radius: 9px;
    background: #fffafb;
}

.jwt-claim__name {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.jwt-claim__value {
    margin-top: 6px;
    color: #4d2433;
    font-size: 12px;
    font-weight: 700;
}

.jwt-claim__sub {
    margin-top: 3px;
    color: #9b808a;
    font-size: 11px;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .jwt-input-panel,
    .jwt-results {
        padding: 18px;
    }

    .jwt-panel__header,
    .jwt-result-panel__title {
        flex-direction: column;
        gap: 10px;
    }

    .jwt-panel__tools {
        width: 100%;
        flex-wrap: wrap;
    }

    .jwt-action-row {
        padding: 16px 18px;
    }

    .jwt-action-button {
        width: 100%;
    }

    .jwt-status {
        margin-left: 18px;
        margin-right: 18px;
    }

    .jwt-claims__grid {
        grid-template-columns: 1fr;
    }
}


/* XML formatter / validator */
.xml-card {
    max-width: 960px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(89, 20, 44, 0.06);
}

.xml-options {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: #fffafb;
}

.xml-options__label {
    color: #5f3745;
    font-size: 13px;
    font-weight: 800;
}

.xml-indent-select {
    min-width: 132px;
    height: 38px;
    padding: 0 34px 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: #4d2433;
    font-size: 13px;
    outline: none;
}

.xml-indent-select:focus {
    border-color: rgba(159, 18, 57, 0.55);
    box-shadow: 0 0 0 3px rgba(159, 18, 57, 0.08);
}

.xml-options__note {
    color: #9b808a;
    font-size: 12px;
}

.xml-workspace {
    padding: 24px;
}

.xml-panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.xml-panel--result {
    background: #fff;
}

.xml-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    background: #fffafb;
}

.xml-panel__header strong {
    display: block;
    color: #5f3745;
    font-size: 13px;
}

.xml-panel__hint {
    display: block;
    margin-top: 4px;
    color: #9b808a;
    font-size: 11px;
}

.xml-panel__tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.xml-count {
    color: #9b808a;
    font-size: 12px;
    white-space: nowrap;
}

.xml-editor {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 260px;
    background: #fff;
}

.xml-editor--result {
    min-height: 260px;
}

.xml-line-numbers {
    overflow: hidden;
    padding: 16px 12px 16px 0;
    border-right: 1px solid #f0e5e9;
    background: #fffafb;
    color: #b39ba4;
    font: 12px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    text-align: right;
    user-select: none;
}

.xml-textarea {
    width: 100%;
    min-height: 260px;
    resize: vertical;
    border: 0;
    padding: 16px;
    background: #fff;
    color: #342229;
    font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    outline: none;
}

.xml-textarea--result {
    background: #fff;
}

.xml-textarea:focus {
    box-shadow: inset 0 0 0 2px rgba(159, 18, 57, 0.08);
}

.xml-textarea::placeholder {
    color: #baa5ad;
}

.xml-action-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 18px 0;
}

.xml-action-button {
    min-width: 130px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid var(--primary);
    border-radius: 9px;
    background: #fff;
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.xml-action-button:hover {
    background: #fff1f2;
}

.xml-action-button:active {
    transform: translateY(1px);
}

.xml-status {
    margin: 0 24px 24px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.6;
}

.xml-status.is-success {
    border: 1px solid #b9dfc7;
    background: #f1fbf4;
    color: #27643b;
}

.xml-status.is-error {
    border: 1px solid #efc1ca;
    background: #fff5f6;
    color: #9f1239;
}

@media (max-width: 720px) {
    .xml-options {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .xml-options__note {
        width: 100%;
    }

    .xml-workspace {
        padding: 18px;
    }

    .xml-panel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .xml-panel__tools {
        width: 100%;
        flex-wrap: wrap;
    }

    .xml-action-row {
        flex-direction: column;
    }

    .xml-action-button {
        width: 100%;
    }

    .xml-editor {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .xml-status {
        margin-left: 18px;
        margin-right: 18px;
    }
}

/* --------------------------------------------------------------------------
   Unix Timestamp
   -------------------------------------------------------------------------- */
.timestamp-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(90, 38, 57, 0.06);
}

.timestamp-body {
    padding: 24px;
}

.timestamp-field-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.timestamp-field {
    display: grid;
    gap: 8px;
}

.timestamp-field--grow {
    flex: 1 1 auto;
}

.timestamp-field--unit {
    flex: 0 0 210px;
}

.timestamp-field label {
    color: #5f3745;
    font-size: 13px;
    font-weight: 800;
}

.timestamp-input,
.timestamp-select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: #342229;
    outline: none;
}

.timestamp-input {
    padding: 0 14px;
    font: 14px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.timestamp-select {
    padding: 0 34px 0 12px;
    font-size: 13px;
}

.timestamp-input:focus,
.timestamp-select:focus {
    border-color: rgba(159, 18, 57, 0.55);
    box-shadow: 0 0 0 3px rgba(159, 18, 57, 0.08);
}

.timestamp-sub-actions {
    display: flex;
    gap: 14px;
    margin-top: 10px;
}

.timestamp-main-action {
    display: flex;
    justify-content: center;
    padding: 22px 0;
}

.timestamp-convert-button {
    min-width: 210px;
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid var(--primary);
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition: opacity .2s ease, transform .2s ease;
}

.timestamp-convert-button:hover {
    opacity: .92;
}

.timestamp-convert-button:active {
    transform: translateY(1px);
}

.timestamp-results {
    display: grid;
    gap: 10px;
}

.timestamp-result-item {
    display: grid;
    grid-template-columns: minmax(165px, .7fr) minmax(0, 1.5fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fffafb;
}

.timestamp-result-item strong,
.timestamp-result-item span {
    display: block;
}

.timestamp-result-item strong {
    color: #5f3745;
    font-size: 13px;
}

.timestamp-result-item span {
    margin-top: 3px;
    color: #9b808a;
    font-size: 11px;
}

.timestamp-result-item code {
    overflow-wrap: anywhere;
    color: #342229;
    font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.timestamp-detected-unit {
    color: #9b808a;
    font-size: 12px;
    text-align: right;
}

.timestamp-status {
    margin-top: 18px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.6;
}

.timestamp-status.is-success {
    border: 1px solid #b9dfc7;
    background: #f1fbf4;
    color: #27643b;
}

.timestamp-status.is-error {
    border: 1px solid #efc1ca;
    background: #fff5f6;
    color: #9f1239;
}

@media (max-width: 720px) {
    .timestamp-body {
        padding: 18px;
    }

    .timestamp-field-row {
        align-items: stretch;
        flex-direction: column;
    }

    .timestamp-field--unit {
        flex-basis: auto;
    }

    .timestamp-main-action {
        padding: 18px 0;
    }

    .timestamp-convert-button {
        width: 100%;
    }

    .timestamp-result-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .timestamp-result-item .text-button {
        width: fit-content;
    }

    .timestamp-detected-unit {
        text-align: left;
    }
}


/* --------------------------------------------------------------------------
   Hash Generator
   -------------------------------------------------------------------------- */
.hash-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(90, 38, 57, 0.06);
}

.hash-options {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.hash-option {
    display: grid;
    gap: 7px;
}

.hash-option label {
    color: #5f3745;
    font-size: 12px;
    font-weight: 800;
}

.hash-select {
    min-width: 180px;
    height: 38px;
    padding: 0 34px 0 12px;
    border: 1px solid #dec6cf;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #4c1c2c;
    font-size: 13px;
}

.hash-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(159, 18, 57, 0.08);
}

.hash-workspace {
    padding: 24px;
}

.hash-panel,
.hash-result-panel {
    overflow: hidden;
    border: 1px solid #ead5dc;
    border-radius: 12px;
    background: #fff;
}

.hash-result-panel {
    background: #fffbfc;
}

.hash-panel__header {
    min-height: 60px;
    padding: 11px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f0dfe4;
    background: #fffafb;
}

.hash-panel__header strong {
    display: block;
    color: #4c1c2c;
    font-size: 14px;
}

.hash-panel__hint {
    display: block;
    margin-top: 3px;
    color: #9a7d87;
    font-size: 11px;
}

.hash-panel__tools {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.hash-count {
    color: #9a7d87;
    font-size: 11px;
}

.hash-textarea,
.hash-result {
    display: block;
    width: 100%;
    min-height: 210px;
    padding: 16px;
    border: 0;
    outline: none;
    resize: vertical;
    background: #fff;
    color: #342229;
    font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.hash-result {
    min-height: 112px;
    resize: none;
    background: #fffbfc;
    overflow-wrap: anywhere;
}

.hash-main-action {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.hash-generate-button,
.hash-file-select-button {
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid var(--primary);
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition: opacity .2s ease, transform .2s ease;
}

.hash-generate-button {
    min-width: 210px;
}

.hash-generate-button:hover,
.hash-file-select-button:hover {
    opacity: .92;
}

.hash-generate-button:active,
.hash-file-select-button:active {
    transform: translateY(1px);
}

.hash-generate-button:disabled {
    cursor: wait;
    opacity: .65;
}

.hash-file-drop {
    padding: 34px 24px;
    border: 1px dashed #d9b5c1;
    border-radius: 12px;
    background: #fffafb;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.hash-file-drop.is-dragover {
    border-color: var(--primary);
    background: #fff3f6;
}

.hash-file-drop__icon {
    margin-bottom: 8px;
    font-size: 30px;
}

.hash-file-drop strong {
    display: block;
    color: #4c1c2c;
    font-size: 15px;
}

.hash-file-drop p {
    margin: 7px 0 16px;
    color: #9a7d87;
    font-size: 12px;
}

.hash-file-select-button {
    min-height: 38px;
    padding: 7px 18px;
    font-size: 13px;
}

.hash-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
}

.hash-file-info__main {
    min-width: 0;
}

.hash-file-info__main strong,
.hash-file-info__main span {
    display: block;
}

.hash-file-info__main strong {
    overflow: hidden;
    color: #4c1c2c;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hash-file-info__main span {
    margin-top: 4px;
    color: #9a7d87;
    font-size: 11px;
}

.hash-status {
    margin-top: 16px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.6;
}

.hash-status.is-success {
    border: 1px solid #b9dfc7;
    background: #f1fbf4;
    color: #27643b;
}

.hash-status.is-error {
    border: 1px solid #efc1ca;
    background: #fff5f6;
    color: #9f1239;
}

@media (max-width: 720px) {
    .hash-options {
        align-items: stretch;
        flex-direction: column;
        padding: 14px 18px;
    }

    .hash-select {
        width: 100%;
    }

    .hash-workspace {
        padding: 18px;
    }

    .hash-panel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hash-panel__tools {
        width: 100%;
        justify-content: space-between;
    }

    .hash-textarea {
        min-height: 190px;
    }

    .hash-generate-button {
        width: 100%;
    }

    .hash-file-info {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* --------------------------------------------------------------------------
   XML field/value list
   -------------------------------------------------------------------------- */
.xml-fields {
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid #ead5dc;
    border-radius: 12px;
    background: #fff;
}

.xml-fields__header {
    min-height: 60px;
    padding: 11px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f0dfe4;
    background: #fffafb;
}

.xml-fields__header strong {
    display: block;
    color: #4c1c2c;
    font-size: 14px;
}

.xml-fields__tools {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.xml-fields__empty {
    padding: 34px 20px;
    color: #9a7d87;
    font-size: 13px;
    text-align: center;
}

.xml-fields__table-wrap {
    max-height: 440px;
    overflow: auto;
}

.xml-fields__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

.xml-fields__table th,
.xml-fields__table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f2e4e8;
    border-right: 1px solid #f2e4e8;
    vertical-align: top;
    text-align: left;
}

.xml-fields__table th:last-child,
.xml-fields__table td:last-child {
    border-right: 0;
}

.xml-fields__table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff6f8;
    color: #6b3346;
    font-weight: 800;
}

.xml-fields__table tbody tr:last-child td {
    border-bottom: 0;
}

.xml-fields__table tbody tr:hover td {
    background: #fffbfc;
}

.xml-fields__table th:nth-child(1),
.xml-fields__table td:nth-child(1) {
    width: 42%;
}

.xml-fields__table th:nth-child(2),
.xml-fields__table td:nth-child(2) {
    width: 20%;
}

.xml-fields__table th:nth-child(3),
.xml-fields__table td:nth-child(3) {
    width: 38%;
}

.xml-fields__path,
.xml-fields__item {
    color: #6b4552;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    overflow-wrap: anywhere;
}

.xml-fields__item {
    color: var(--primary);
    font-weight: 700;
}

.xml-fields__value {
    color: #342229;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .xml-fields__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .xml-fields__tools {
        width: 100%;
        justify-content: space-between;
    }

    .xml-fields__table {
        min-width: 720px;
    }
}
