@container panel-data (width > 58rem) {
    .keys-table td:nth-child(2),
    .keys-table td:nth-child(6) {
        max-width: 200px;
        overflow-wrap: anywhere;
    }
    .keys-table .key-context {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }
    .keys-table .key-device-cell {
        max-width: 150px;
    }
}
@container panel-content (max-width: 58rem) {
    .analysis {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
    .ledger-values {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
    }
    .ledger-values > div,
    .ledger-values > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 0;
    }
    .ledger-secondary {
        display: flex;
        flex-wrap: wrap;
        gap: 16px 24px;
    }
    .ledger-secondary > div {
        gap: 12px;
    }
}
@container panel-data (max-width: 58rem) {
    .keys-table thead .key-selection-checkbox {
        visibility: hidden;
    }
    .keys-table,
    .offer-table,
    .activity-table {
        min-width: 0;
        padding: 0;
        background: transparent;
    }
    .keys-table thead,
    .offer-table thead,
    .activity-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .keys-table tbody,
    .offer-table tbody,
    .activity-table tbody {
        display: grid;
        gap: 12px;
    }
    .keys-table tr::after,
    .offer-table tr::after,
    .activity-table tr::after {
        display: none;
    }
    .offer-table tr,
    .activity-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 20px;
        border-radius: var(--radius-large);
        background: var(--surface);
    }
    .keys-table td,
    .offer-table td,
    .activity-table td {
        display: block;
        min-width: 0;
        width: auto !important;
        padding: 0;
        border: 0;
        border-radius: 0 !important;
        background: transparent !important;
        overflow-wrap: anywhere;
    }
    .keys-table td::before,
    .offer-table td::before,
    .activity-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: var(--muted);
        font-size: 0.8125rem;
        font-weight: 400;
    }
    .offer-table td:last-child,
    .activity-table td:nth-child(2),
    .activity-table td:last-child {
        grid-column: 1 / -1;
    }
    .keys-table tr {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: 'key status' 'game duration' 'price expires' 'device actions';
        align-items: start;
        gap: 12px 16px;
        padding: 20px;
        border-radius: var(--radius-large);
        background: var(--surface);
    }
    .keys-table td::before {
        display: none;
    }
    .keys-table td:nth-child(1) {
        grid-area: key;
    }
    .keys-table td:nth-child(2) {
        grid-area: game;
    }
    .keys-table td:nth-child(3) {
        grid-area: status;
        text-align: right;
    }
    .keys-table td:nth-child(4) {
        grid-area: duration;
        color: var(--muted);
        text-align: right;
        font-size: 0.8125rem;
    }
    .keys-table td:nth-child(5) {
        grid-area: price;
        text-align: left;
        font-weight: 550;
    }
    .keys-table td:nth-child(6) {
        position: absolute;
        width: 1px !important;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .keys-table td:nth-child(7) {
        grid-area: expires;
        text-align: right;
    }
    .keys-table td:nth-child(8) {
        grid-area: device;
        align-self: center;
        margin-top: 4px;
        font-size: 0.8125rem;
    }
    .keys-table td:nth-child(9) {
        grid-area: actions;
        align-self: center;
        margin-top: 4px;
    }
    .keys-table .key-label {
        font-size: 0.9375rem;
    }
    .keys-table .key-note {
        max-width: none;
    }
    .keys-table .key-context,
    .keys-table .device-brand {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }
    .keys-table .date-cell:not([data-label=''])::before {
        content: attr(data-label);
        display: inline;
        margin-right: 4px;
        font-size: inherit;
    }
    .keys-table .date-cell,
    .activity-table td:first-child {
        white-space: normal;
    }
    .keys-table .key-actions-cell {
        display: flex;
        justify-content: flex-end;
    }
    .keys-table .row-action {
        min-height: 48px;
        padding: 12px;
        font-size: 0.8125rem;
    }
    .offer-table .inline-actions .button {
        flex: 1 1 4.5rem;
        min-width: min(100%, 4.5rem);
        min-height: 48px;
        overflow-wrap: normal;
    }
    .offer-table tr {
        grid-template-areas: 'duration price' 'status status' 'actions actions';
        gap: 8px 16px;
    }
    .offer-table td:nth-child(1) {
        grid-area: duration;
        font-size: 1rem;
        font-weight: 600;
    }
    .offer-table td:nth-child(2) {
        grid-area: price;
        text-align: right;
        font-size: 1rem;
        font-weight: 600;
    }
    .offer-table td:nth-child(3) {
        grid-area: status;
    }
    .offer-table td:nth-child(4) {
        grid-area: actions;
    }
    .offer-table td::before {
        display: none;
    }
    .activity-table tr {
        grid-template-areas: 'event time' 'details details' 'key key' 'owner owner';
        gap: 12px 16px;
    }
    .activity-table td:nth-child(1) {
        grid-area: time;
        text-align: right;
        font-size: 0.8125rem;
    }
    .activity-table td:nth-child(2) {
        grid-area: event;
        font-size: 0.9375rem;
        font-weight: 600;
    }
    .activity-table td:nth-child(3) {
        grid-area: key;
    }
    .activity-table td:nth-child(4) {
        grid-area: owner;
    }
    .activity-table td:nth-child(5) {
        grid-area: details;
        font-size: 0.875rem;
    }
    .activity-table td:nth-child(1)::before,
    .activity-table td:nth-child(2)::before,
    .activity-table td:nth-child(5)::before {
        display: none;
    }
    .activity-table td:nth-child(3),
    .activity-table td:nth-child(4) {
        font-size: 0.8125rem;
    }
    .activity-table td:nth-child(3)::before,
    .activity-table td:nth-child(4)::before {
        display: inline;
        margin-right: 8px;
    }
    .activity-table code {
        font-size: 0.8125rem;
    }
}
@container key-register (max-width: 58rem) {
    .toolbar.key-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding-bottom: 12px;
    }
    .key-toolbar > .search {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
    }
    .key-toolbar > .filter {
        min-width: 0;
        width: 100%;
    }
    .key-toolbar:not(.has-seller-filter) > .filter {
        grid-column: 1 / -1;
    }
    .key-toolbar > .key-selection-mobile {
        display: inline-flex;
        grid-column: 1;
        grid-row: 3;
        min-height: 40px;
        font-size: 0.875rem;
    }
    .key-toolbar > .toolbar-count {
        grid-column: 2;
        grid-row: 3;
        justify-self: end;
    }
    .key-toolbar > .key-selection-bar {
        width: 100%;
    }
}
@container panel-data (min-width: 38rem) and (max-width: 58rem) {
    .keys-table tbody {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .keys-table tr {
        padding: 16px;
    }
}
@media (max-width: 599px) {
    .key-selection-bar {
        width: 100%;
    }
    .ledger,
    .activity-chart {
        padding: 20px;
    }
    .ledger-values {
        gap: 0 20px;
    }
    .chart-wrap {
        margin-top: 20px;
    }
    .chart-legend {
        gap: 12px 16px;
        padding-left: 0;
        font-size: 0.75rem;
    }
    .activity-log {
        margin-top: 24px;
    }
    .game-list-row {
        grid-template-columns: minmax(0, 1fr) 20px;
        gap: 6px 16px;
    }
    .game-list-name {
        grid-column: 1;
    }
    .game-list-row .badge {
        grid-column: 1;
        grid-row: 2;
    }
    .game-list-row > svg {
        grid-column: 2;
        grid-row: 1 / 3;
    }
    .game-details > .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }
    .game-details > .pricing-heading {
        flex-direction: row;
    }
    .toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }
    .search {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
    }
    .filter {
        min-width: 0;
        width: 100%;
    }
    .table-wrap .empty-state {
        grid-column: 1 / -1;
    }
    .field-pair {
        grid-template-columns: minmax(0, 1fr);
    }
    .button,
    .icon-button,
    .row-action,
    .inline-actions .button,
    .page-buttons .button {
        min-height: 48px;
    }
    .icon-button {
        min-width: 48px;
    }
    .offer-table tr {
        padding: 20px;
    }
}
@container (max-width: 14rem) {
    .ledger-values {
        grid-template-columns: minmax(0, 1fr);
    }
}
@container panel-data (max-width: 20rem) {
    .keys-table tr {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'key' 'game' 'status' 'duration' 'price' 'expires' 'device' 'actions';
    }
    .keys-table td {
        text-align: left !important;
    }
    .keys-table .badge {
        white-space: normal;
    }
    .keys-table .key-actions-cell .button {
        width: 100%;
    }
}
@container panel-data (max-width: 14rem) {
    .offer-table tr {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'duration' 'price' 'status' 'actions';
    }
    .offer-table td:nth-child(2) {
        text-align: left;
    }
}
