* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    :root {
      --sky: #0ea5e9;
      --sky-dark: #0284c7;
      --sky-light: #e0f2fe;
      --sky-lighter: #f0f9ff;
      --slate: #1e293b;
      --slate-light: #64748b;
      --slate-lighter: #94a3b8;
      --bg: #f8fafc;
      --white: #ffffff;
      --border: #e2e8f0;
      --danger: #ef4444;
      --danger-light: #fee2e2;
      --green: #22c55e;
      --green-light: #dcfce7;
      --amber: #f59e0b;
      --amber-light: #fef3c7;
    }

    body {
      font-family: Georgia, 'Times New Roman', serif;
      background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%);
      color: var(--slate);
      min-height: 100vh;
    }

    @keyframes wave {
      from { transform: scaleY(0.5); }
      to { transform: scaleY(1.5); }
    }

    @keyframes pulse-ring {
      0% { transform: scale(1); opacity: 0.8; }
      100% { transform: scale(1.5); opacity: 0; }
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes slideIn {
      from { opacity: 0; transform: translateX(-8px); }
      to { opacity: 1; transform: translateX(0); }
    }

    header {
      position: sticky;
      top: 0;
      z-index: 20;
      background: rgba(255, 255, 255, 0.88);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border);
      padding: 0 20px;
    }

    .header-content {
      max-width: 720px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      gap: 10px;
      height: 62px;
    }

    .logo-container {
      display: flex;
      flex-direction: column;
      line-height: 1;
    }

    .logo-title {
      font-weight: 800;
      font-size: 17px;
      color: var(--slate);
      letter-spacing: -0.5px;
    }

    .logo-subtitle {
      font-size: 10px;
      color: var(--slate-lighter);
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    .save-indicator {
      font-size: 11px;
      font-style: italic;
      margin-left: 4px;
      transition: color 0.3s;
      animation: fadeIn 0.2s ease;
    }

    .save-indicator.saving {
      color: var(--slate-lighter);
    }

    .save-indicator.saved {
      color: var(--green);
    }

    .header-right {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .search-box {
      position: relative;
      display: flex;
      align-items: center;
    }

    .search-icon {
      position: absolute;
      left: 10px;
      color: var(--slate-lighter);
      display: flex;
      align-items: center;
    }

    input[type="text"], input[type="password"], textarea {
      width: 100%;
      padding: 10px 14px;
      border: 1.5px solid var(--border);
      border-radius: 10px;
      font-size: 14px;
      font-family: Georgia, 'Times New Roman', serif;
      color: var(--slate);
      background: var(--white);
      outline: none;
      transition: border-color 0.2s;
    }

    input[type="text"]:focus, textarea:focus {
      border-color: var(--sky);
    }

    .search-input {
      padding-left: 30px;
      width: 150px;
      height: 34px;
      font-size: 13px;
    }

    button {
      font-family: Georgia, 'Times New Roman', serif;
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-install {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 7px 13px;
      background: var(--white);
      color: var(--sky);
      border: 1.5px solid var(--sky);
      border-radius: 10px;
      font-weight: 600;
      font-size: 13px;
      white-space: nowrap;
    }

    .btn-install:hover {
      background: var(--sky-lighter);
    }

    .btn-installed {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 7px 12px;
      background: var(--green-light);
      color: var(--green);
      border-radius: 10px;
      font-size: 12px;
      font-weight: 600;
      border: 1px solid rgba(34, 197, 94, 0.15);
    }

    .btn-new {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 8px 14px;
      background: var(--sky);
      color: var(--white);
      border: none;
      border-radius: 10px;
      font-weight: 600;
      font-size: 13px;
      box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
    }

    .btn-new:hover {
      background: var(--sky-dark);
    }

    .install-banner {
      background: linear-gradient(135deg, var(--sky), var(--sky-dark));
      color: var(--white);
      padding: 10px 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      font-size: 13px;
      font-weight: 500;
      animation: fadeIn 0.3s ease;
    }

    .install-banner button {
      background: var(--white);
      color: var(--sky);
      border: none;
      border-radius: 8px;
      padding: 5px 14px;
      font-family: Georgia, 'Times New Roman', serif;
      font-weight: 700;
      font-size: 13px;
    }

    .install-banner .close-btn {
      background: transparent;
      color: rgba(255, 255, 255, 0.75);
      border: none;
      font-size: 18px;
      line-height: 1;
      padding: 0 4px;
    }

    .status-toast {
      position: fixed;
      top: 70px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--slate);
      color: var(--white);
      padding: 10px 20px;
      border-radius: 24px;
      font-size: 13px;
      font-weight: 500;
      z-index: 100;
      animation: fadeIn 0.2s ease;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 50;
      background: rgba(15, 23, 42, 0.4);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-content {
      border-radius: 20px;
      padding: 28px;
      width: 100%;
      max-width: 520px;
      animation: fadeIn 0.25s ease;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 18px;
    }

    .modal-title {
      font-weight: 700;
      font-size: 16px;
      color: var(--slate);
    }

    .color-picker {
      display: flex;
      gap: 6px;
    }

    .color-btn {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 2px solid;
      cursor: pointer;
      transition: all 0.2s;
    }

    .input-group {
      margin-bottom: 10px;
    }

    .textarea-large {
      min-height: 120px;
      resize: vertical;
      line-height: 1.6;
    }

    .voice-transcript {
      background: var(--sky-lighter);
      border: 1px solid var(--sky-light);
      border-radius: 8px;
      padding: 8px 12px;
      margin-bottom: 10px;
      font-size: 13px;
      color: var(--sky);
      font-style: italic;
    }

    .modal-actions {
      display: flex;
      gap: 10px;
      align-items: center;
    }

    .mic-btn {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--sky);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      flex-shrink: 0;
      transition: background 0.2s, transform 0.15s;
    }

    .mic-btn.recording {
      background: var(--danger);
      transform: scale(1.05);
    }

    .pulse-ring {
      position: absolute;
      border-radius: 50%;
      border: 2px solid var(--danger);
      opacity: 0.4;
      animation: pulse-ring 1.2s ease-out infinite;
    }

    .waveform {
      display: flex;
      align-items: center;
      gap: 3px;
      height: 24px;
    }

    .waveform-bar {
      width: 3px;
      border-radius: 2px;
      background-color: var(--slate-lighter);
      height: 4px;
      transition: height 0.3s ease;
    }

    .waveform-bar.recording {
      background-color: var(--sky);
      animation: wave 0.8s ease-in-out infinite alternate;
    }

    .btn-cancel {
      padding: 10px 16px;
      background: rgba(255, 255, 255, 0.6);
      border: 1.5px solid var(--border);
      border-radius: 10px;
      color: var(--slate-light);
      font-size: 14px;
    }

    .btn-save {
      padding: 10px 20px;
      background: var(--sky);
      color: var(--white);
      border: none;
      border-radius: 10px;
      font-weight: 600;
      font-size: 14px;
    }

    .btn-save:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    main {
      max-width: 720px;
      margin: 0 auto;
      padding: 28px 20px 100px;
    }

    .empty-state {
      text-align: center;
      padding-top: 80px;
      color: var(--slate-lighter);
    }

    .empty-emoji {
      font-size: 48px;
      margin-bottom: 16px;
    }

    .empty-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--slate-light);
      margin-bottom: 6px;
    }

    .empty-desc {
      font-size: 14px;
    }

    .notes-grid {
      display: grid;
      gap: 14px;
    }

    .note-card {
      border-radius: 16px;
      padding: 20px 22px;
      animation: slideIn 0.3s ease both;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
      transition: box-shadow 0.2s, transform 0.2s;
      border: 1.5px solid;
    }

    .note-card:hover {
      box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
      transform: translateY(-1px);
    }

    .note-header {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 8px;
    }

    .note-title-section {
      flex: 1;
    }

    .note-title {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      color: var(--slate);
      line-height: 1.3;
    }

    .note-date {
      font-size: 12px;
      color: var(--slate-lighter);
    }

    .note-actions {
      display: flex;
      gap: 6px;
      flex-shrink: 0;
    }

    .icon-btn {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.6);
      border: 1px solid var(--border);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    .icon-btn.mic {
      background: var(--sky-light);
      border-color: var(--sky);
      color: var(--sky);
    }

    .icon-btn.mic.recording {
      background: var(--danger-light);
      border-color: var(--danger);
      color: var(--danger);
    }

    .icon-btn.danger {
      color: var(--danger);
    }

    .recording-indicator {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      color: var(--sky);
      font-size: 13px;
    }

    .note-content {
      margin: 0;
      font-size: 14px;
      color: var(--slate-light);
      line-height: 1.65;
      white-space: pre-wrap;
    }

    .note-tags {
      display: flex;
      gap: 6px;
      margin-top: 12px;
      flex-wrap: wrap;
    }

    .tag {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      background: rgba(255, 255, 255, 0.7);
      border: 1px solid;
      border-radius: 20px;
      font-size: 12px;
      color: var(--slate-light);
      font-family: Georgia, 'Times New Roman', serif;
    }

    .edit-mode textarea, .edit-mode input[type="text"] {
      background: rgba(255, 255, 255, 0.8);
      margin-bottom: 8px;
    }

    .edit-actions {
      display: flex;
      gap: 8px;
      margin-top: 12px;
      align-items: center;
    }

    .autosave-text {
      font-size: 11px;
      color: var(--slate-lighter);
      font-style: italic;
    }

    .floating-mic {
      position: fixed;
      bottom: 28px;
      right: 24px;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: var(--sky);
      border: none;
      cursor: pointer;
      z-index: 30;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 6px 24px rgba(14, 165, 233, 0.4);
      transition: background 0.2s, transform 0.15s;
    }

    .floating-mic:hover {
      transform: scale(1.08);
    }

    .floating-mic.recording {
      background: var(--danger);
      box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
      transform: scale(1.05);
    }

    .floating-mic.recording:hover {
      transform: scale(1.08);
    }

    .hidden {
      display: none;
    }
