      @media (max-width: 900px) {
        .stats-grid {
          grid-template-columns: 1fr;
        }
      }

      .table-wrap {
        position: relative;
        overflow-y: auto;
        overflow-x: auto;
        border: 1px solid rgba(0, 150, 200, 0.15);
        border-radius: 16px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.7) 100%);
        box-shadow: inset 0 2px 8px rgba(0, 100, 150, 0.05);
      }

      .table-loading-overlay {
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        opacity: 0;
        pointer-events: none;
        transition: opacity 150ms ease;
        border-radius: 16px;
      }

      .table-loading-overlay.visible {
        opacity: 1;
        pointer-events: auto;
      }

      .table-loading-spinner {
        width: 32px;
        height: 32px;
        border: 3px solid rgba(0, 188, 212, 0.2);
        border-top-color: #00bcd4;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
      }

      @keyframes spin {
        to { transform: rotate(360deg); }
      }

      table {
        width: 100%;
        border-collapse: collapse;
        min-width: 100%;
        table-layout: auto;
      }

      th,
      td {
        padding: 16px 14px;
        text-align: left;
        border-bottom: 1px solid rgba(0, 150, 200, 0.08);
        vertical-align: top;
        font-size: 15px;
      }

      th {
        position: sticky;
        top: 0;
        background: linear-gradient(180deg, #e8f4f8 0%, #e0f7fa 100%);
        z-index: 1;
        font-size: 13px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--muted);
        white-space: nowrap;
        font-weight: 700;
        border-bottom: 1.5px solid rgba(0, 188, 212, 0.25);
      }

      .text-date {
        color: #00838f;
        font-size: 16px;
        white-space: nowrap;
        font-weight: 500;
      }

      .text-code {
        color: #1a8cff;
        font-family: "SF Mono", Monaco, Consolas, monospace;
        font-size: 17px;
        font-weight: 500;
      }

      .text-content {
        color: var(--text);
        line-height: 1.6;
        font-size: 15px;
      }

      .text-result {
        color: var(--text);
        line-height: 1.6;
        font-size: 15px;
        font-weight: 600;
      }

      .text-note {
        color: #4a7a8a;
        font-size: 14px;
        line-height: 1.5;
      }

      .text-pending {
        color: #e57373;
        font-weight: 600;
        white-space: nowrap;
      }

      .text-closed {
        color: #00bfa5;
        font-weight: 600;
        white-space: nowrap;
      }

      tbody tr {
        cursor: pointer;
        transition: background-color 150ms ease;
      }

      tbody tr:hover {
        background: rgba(0, 188, 212, 0.06);
      }

      tbody tr.row-purple:hover { background: rgba(124, 77, 255, 0.08); }
      tbody tr.row-green:hover { background: rgba(0, 191, 165, 0.08); }
      tbody tr.row-red:hover { background: rgba(255, 82, 82, 0.08); }
      tbody tr.row-orange:hover { background: rgba(255, 171, 64, 0.08); }
      tbody tr.row-blue:hover { background: rgba(0, 145, 234, 0.08); }
      tbody tr.row-gray:hover { background: rgba(74, 122, 138, 0.1); }
      tbody tr.row-white:hover { background: rgba(0, 188, 212, 0.06); }

      tbody tr.selected {
        background: var(--panel-strong);
        box-shadow: inset 0 0 0 2px rgba(0, 188, 212, 0.3);
      }

      @keyframes flash-highlight {
        0%, 100% { background-color: transparent; }
        50% { background-color: rgba(0, 188, 212, 0.35); }
      }

      .row-flash {
        animation: flash-highlight 0.4s ease-in-out 3;
      }

      .duplicate-warning {
        background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
        border: 2px solid #00bcd4;
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 16px;
      }

      .duplicate-warning h4 {
        margin: 0 0 12px 0;
        color: #00838f;
        font-size: 15px;
      }

      .duplicate-record {
        background: white;
        border-radius: 12px;
        padding: 12px;
        cursor: pointer;
        transition: all 200ms ease;
        border: 1px solid rgba(0, 188, 212, 0.3);
      }

      .duplicate-record:hover {
        box-shadow: 0 4px 12px rgba(0, 188, 212, 0.2);
        transform: translateY(-2px);
      }

      .duplicate-record .dup-header {
        display: flex;
        gap: 12px;
        align-items: center;
        margin-bottom: 8px;
      }

      .duplicate-record .dup-id {
        font-weight: 700;
        color: #00838f;
      }

      .duplicate-record .dup-date {
        color: #4a7a8a;
        font-size: 13px;
      }

      .duplicate-record .dup-content {
        color: #0d3b4f;
        font-size: 14px;
        line-height: 1.5;
      }

      .input-duplicate {
        border-color: #00bcd4 !important;
        background: #e0f7fa !important;
        box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15) !important;
      }

      .tag {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
      }

      .tag::before {
        content: "";
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: currentColor;
      }

      .purple { color: var(--purple); background: rgba(124, 77, 255, 0.12); }
      .green { color: var(--green); background: rgba(0, 191, 165, 0.12); }
      .red { color: var(--red); background: rgba(255, 82, 82, 0.12); }
      .orange { color: var(--orange); background: rgba(255, 171, 64, 0.12); }
      .blue { color: var(--blue); background: rgba(0, 145, 234, 0.12); }
      .white { color: #00838f; background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(0, 150, 200, 0.2); }
      .gray { color: #4a7a8a; background: rgba(74, 122, 138, 0.15); }

      .login-screen {
        min-height: 100vh;
        display: grid;
        place-items: center;
        padding: 24px;
      }

      .login-card {
        width: min(460px, 100%);
        padding: 30px;
      }

      .login-card h2 {
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 32px;
        background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--accent) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }

      .login-card p {
        color: var(--muted);
        margin-bottom: 22px;
      }

      .hidden {
        display: none !important;
      }

      .hint,
      .message {
        margin-top: 12px;
        font-size: 13px;
        color: var(--muted);
      }

      .message.error {
        color: #d32f2f;
      }

      .message.success {
        color: #00897b;
      }

      .ai-toast {
        position: fixed;
        top: 18px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999;
        max-width: 60vw;
        padding: 9px 18px;
        border-radius: 999px;
        font-size: 13px;
        color: var(--text);
        background: var(--panel-strong);
        border: 1px solid var(--line);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: opacity 0.2s ease;
      }

      .ai-toast.loading {
        color: var(--muted);
      }

      .ai-toast.success {
        color: #00897b;
      }

      .ai-toast.error {
        color: #d32f2f;
      }

      .ai-fill-flash {
        animation: aiFillFlash 0.9s ease-in-out 3;
      }

      @keyframes aiFillFlash {
        0%, 100% {
          background-color: transparent;
        }
        50% {
          background-color: rgba(64, 158, 255, 0.22);
        }
      }

      .muted {
        color: var(--muted);
      }

      .color-select-wrapper {
        position: relative;
      }

      .color-select-display {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        border: 1px solid rgba(0, 150, 200, 0.2);
        background: rgba(255, 255, 255, 0.85);
        border-radius: 16px;
        padding: 12px 14px;
        color: var(--text);
        cursor: pointer;
        transition: all 200ms ease;
        font-size: 14px;
        font-weight: 500;
      }

      .color-select-display:hover {
        border-color: rgba(0, 188, 212, 0.4);
        background: rgba(255, 255, 255, 0.95);
      }

      .color-select-display:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
      }

      .color-dot {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        flex-shrink: 0;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      }

      .color-select-arrow {
        margin-left: auto;
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid var(--muted);
        transition: transform 200ms ease;
      }

      .color-select-wrapper.open .color-select-arrow {
        transform: rotate(180deg);
      }

      .color-select-dropdown {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(0, 150, 200, 0.2);
        border-radius: 16px;
        box-shadow: 0 12px 32px rgba(0, 100, 150, 0.2);
        z-index: 1000;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: all 200ms ease;
      }

      .color-select-wrapper.open .color-select-dropdown {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
      }

      .color-option {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px;
        cursor: pointer;
        transition: all 150ms ease;
        font-size: 14px;
        font-weight: 500;
        color: var(--text);
      }

      .color-option:hover {
        background: rgba(0, 188, 212, 0.08);
      }

      .color-option.selected {
        background: rgba(0, 188, 212, 0.12);
      }

      .color-option .color-dot {
        width: 16px;
        height: 16px;
      }

      .color-option .color-label {
        flex: 1;
      }

      .color-white { background: linear-gradient(135deg, #ffffff, #f0f0f0); border: 1px solid rgba(0, 150, 200, 0.3); }
      .color-purple { background: linear-gradient(135deg, #9c7cff, #7c4dff); }
      .color-green { background: linear-gradient(135deg, #26d9b8, #00bfa5); }
      .color-red { background: linear-gradient(135deg, #ff6b6b, #ff5252); }
      .color-orange { background: linear-gradient(135deg, #ffbb5c, #ffab40); }
      .color-blue { background: linear-gradient(135deg, #3da8f5, #0091ea); }
      .color-gray { background: linear-gradient(135deg, #8fa3ad, #6b8a96); }
      .color-pending { background: linear-gradient(135deg, #ff6b6b, #e57373); }
      .color-closed { background: linear-gradient(135deg, #26d9b8, #00bfa5); }

      .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 16px;
        flex-wrap: wrap;
      }

      .pagination-strip {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }

      .pagination button {
        padding: 8px 14px;
        font-size: 14px;
        min-width: 40px;
      }

      .pagination button.active {
        background: #00bcd4;
        color: white;
        box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
      }

      .pagination .page-info {
        font-size: 13px;
        color: var(--muted);
        padding: 0 12px;
      }

      .pagination .end-hint {
        font-size: 12px;
        color: var(--muted);
        opacity: 0.8;
        padding: 4px 0 0;
      }

      @media (max-width: 1080px) {
        .layout {
          grid-template-columns: 1fr;
          height: auto;
        }

        .stats-inline {
          flex-wrap: wrap;
          gap: 10px;
        }

        .shell {
          height: auto;
        }
      }

      @media (max-width: 720px) {
        .shell {
          padding: 12px 8px 20px;
          height: auto;
          min-height: 100vh;
        }

        .panel,
        .login-card {
          border-radius: 18px;
          padding: 14px;
        }

        .grid.two {
          grid-template-columns: 1fr;
        }

        body {
          background: linear-gradient(160deg, #e8f4f8 0%, #e0f7fa 50%, #b2ebf2 100%);
        }

        .panel {
          border-radius: 18px;
        }
      }

      @media (max-width: 600px) {
        .layout {
          grid-template-columns: 1fr;
          gap: 16px;
        }

        .layout > aside,
        .layout > section {
          height: auto;
          overflow: visible;
        }

        .layout > aside.panel {
          overflow: visible;
          height: auto;
        }

        .section-title {
          flex-direction: column;
          align-items: flex-start;
          gap: 10px;
          margin-bottom: 14px;
        }

        .section-title h2 {
          font-size: 17px;
        }

        .stats-inline {
          flex-wrap: wrap;
          gap: 8px 12px;
          padding-left: 0;
          font-size: 12px;
          width: 100%;
        }

        .title-with-btn {
          flex-direction: column;
          align-items: flex-start;
          gap: 10px;
          width: 100%;
        }

        .title-with-btn .sms-link-btn {
          align-self: flex-start;
        }

        .toolbar {
          flex-direction: column;
          gap: 10px;
        }

        .search-input-wrapper {
          width: 100%;
        }

        .color-filter-wrapper,
        .closed-filter-wrapper {
          flex: 1;
          min-width: 0;
        }

        button {
          padding: 10px 14px;
          font-size: 14px;
        }

        .primary {
          width: 100%;
        }

        input,
        select,
        textarea {
          padding: 10px 12px;
          font-size: 15px;
        }

        textarea {
          min-height: 72px;
        }

        label {
          font-size: 12px;
          margin-bottom: 6px;
        }

        th,
        td {
          padding: 10px 8px;
          font-size: 13px;
        }

        th {
          font-size: 11px;
          padding: 10px 6px;
        }

        .text-code {
          font-size: 14px;
          word-break: break-all;
        }

        .text-date {
          font-size: 13px;
        }

        .text-content,
        .text-result,
        .text-note {
          font-size: 13px;
          line-height: 1.5;
          max-width: 150px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .logout-btn {
          position: absolute;
          top: 8px;
          right: 8px;
          padding: 6px 10px;
          font-size: 12px;
        }

        .table-wrap {
          border-radius: 16px;
          -webkit-overflow-scrolling: touch;
        }

        #pagination {
          flex-wrap: wrap;
          justify-content: center;
        }
      }

      @media (max-width: 480px) {
        .shell {
          padding: 8px 6px 16px;
        }

        .panel {
          padding: 12px;
          border-radius: 14px;
        }

        .section-title h2 {
          font-size: 16px;
        }

        .section-title small {
          font-size: 11px;
        }

        .grid {
          gap: 10px;
        }

        .actions {
          flex-direction: column;
          gap: 8px;
        }

        .actions button {
          width: 100%;
          text-align: center;
        }

        .secondary {
          width: 100%;
        }

        input,
        select,
        textarea {
          padding: 9px 11px;
          font-size: 14px;
          border-radius: 12px;
        }

        textarea {
          min-height: 64px;
        }

        .color-select-display {
          padding: 9px 11px;
          font-size: 13px;
        }

        .color-select-dropdown {
          font-size: 13px;
        }

        .color-option {
          padding: 8px 10px;
        }

        th,
        td {
          padding: 8px 6px;
          font-size: 12px;
        }

        th {
          font-size: 10px;
          padding: 8px 4px;
        }

        .text-content,
        .text-result,
        .text-note {
          font-size: 12px;
          max-width: 100px;
        }

        .text-code {
          font-size: 12px;
        }

        .stat-item strong {
          font-size: 13px;
        }

        .danger {
          padding: 5px 10px;
          font-size: 12px;
        }

        .duplicate-warning {
          padding: 12px;
          border-radius: 12px;
        }

        .duplicate-warning h4 {
          font-size: 13px;
        }

        .duplicate-record {
          padding: 10px;
        }

        table {
          min-width: 600px;
        }

        .modal-overlay {
          padding: 10px;
          align-items: flex-end;
        }

        .sms-modal {
          width: 100%;
          max-height: 92vh;
          border-radius: 12px 12px 0 0;
          transform: translateY(100%);
        }

        .modal-overlay:not(.hidden) .sms-modal {
          transform: translateY(0);
        }

        .modal-header {
          padding: 14px 18px;
        }

        .modal-header h3 {
          font-size: 16px;
        }

        .modal-close-btn {
          width: 30px;
          height: 30px;
          font-size: 14px;
        }

        .sms-search-wrapper {
          padding: 10px 18px;
        }

        .sms-search-input {
          padding: 9px 12px 9px 34px;
          font-size: 13px;
        }

        .sms-list {
          padding: 12px 18px;
          min-height: 200px;
          max-height: 62vh;
        }

        .sms-item {
          padding: 10px 12px;
          border-radius: 6px;
          margin-bottom: 6px;
        }

        .sms-item-title {
          font-size: 13px;
        }

        #favoriteModal .sms-item {
          padding: 7px 9px;
          margin-bottom: 5px;
        }

        #favoriteModal .sms-item-title,
        #favoriteModal .link-item-title {
          font-size: 13px;
          padding: 2px 6px;
        }

        #favoriteModal .sms-item-header {
          margin-bottom: 5px;
        }

        #favoriteModal .sms-item-content {
          font-size: 11px;
          line-height: 1.4;
        }

        .sms-item-content {
          font-size: 12px;
          padding: 0;
        }

        .sms-item-btn {
          padding: 3px 8px;
          font-size: 11px;
        }

        .favorite-tabs {
          padding: 0 18px;
          gap: 16px;
        }

        .favorite-tab {
          padding: 10px 4px;
          font-size: 13px;
        }

        .sms-add-form {
          padding: 12px 18px 16px;
        }

        .sms-add-form input,
        .sms-add-form textarea {
          padding: 9px 12px;
          font-size: 13px;
        }

        .sms-add-actions {
          flex-direction: column;
          gap: 8px;
        }

        .sms-add-actions button {
          width: 100%;
        }

        .other-paste-area {
          padding: 12px;
          min-height: 50px;
        }

        .other-image-thumb {
          width: 36px;
          height: 36px;
        }

        .stats-grid {
          grid-template-columns: 1fr;
          gap: 12px;
        }

        .stats-card {
          padding: 16px;
        }

        .stats-card-header h3 {
          font-size: 16px;
        }

        .stats-date-picker {
          flex-direction: column;
          align-items: stretch;
          gap: 8px;
        }

        .stats-date-picker label {
          text-align: center;
        }

        .message {
          font-size: 13px;
          padding: 10px 14px;
        }

        .hidden {
          display: none !important;
        }
      }

      @media (max-width: 360px) {
        .shell {
          padding: 6px 4px 12px;
        }

        .panel {
          padding: 10px;
          border-radius: 12px;
        }

        .section-title h2 {
          font-size: 15px;
        }

        input,
        select,
        textarea {
          font-size: 13px;
          padding: 8px 10px;
        }

        button {
          padding: 9px 12px;
          font-size: 13px;
        }

        th,
        td {
          padding: 7px 5px;
          font-size: 11px;
        }

        .sms-item {
          padding: 8px 10px;
        }

        .sms-item-title {
          font-size: 12px;
        }

        .sms-item-content {
          font-size: 11px;
        }
      }

