.rot-root {
    --rot-accent: #7c3aed;
    --rot-accent-light: #8b5cf6;
    --rot-purple: #9333ea;
    --rot-result: #2563eb;
    --rot-result-bg: #eff6ff;
    --rot-result-border: #bfdbfe;
    --rot-result-label: #2563eb;
    --rot-field-bg: #f8fafc;
    --rot-field-border: #e2e8f0;
    --rot-field-hover: #bfdbfe;
    --rot-field-hover-purple: #e9d5ff;
    --rot-card-bg: rgba(255, 255, 255, 0.8);
    --rot-card-border: rgba(255, 255, 255, 0.2);
    --rot-text-main: #334155;
    --rot-text-label: #64748b;
    --rot-text-hint: #94a3b8;
    --rot-formula-bg: #f1f5f9;
    --rot-formula-text: #64748b;
    --rot-sep-color: #cbd5e1;
  }

  .theme-dark .rot-root {
    --rot-result-bg: rgba(37, 99, 235, 0.2);
    --rot-result-border: rgba(37, 99, 235, 0.3);
    --rot-result-label: #60a5fa;
    --rot-result: #60a5fa;
    --rot-field-bg: rgba(30, 41, 59, 0.5);
    --rot-field-border: #334155;
    --rot-field-hover: rgba(37, 99, 235, 0.3);
    --rot-field-hover-purple: rgba(147, 51, 234, 0.3);
    --rot-card-bg: rgba(15, 23, 42, 0.8);
    --rot-card-border: rgba(51, 65, 85, 0.3);
    --rot-text-main: #e2e8f0;
    --rot-text-label: #94a3b8;
    --rot-text-hint: #64748b;
    --rot-formula-bg: #1e293b;
    --rot-formula-text: #94a3b8;
    --rot-sep-color: #475569;
  }

  .rot-card {
    width: 100%;
    max-width: 56rem;
    margin: 0 auto;
    background: var(--rot-card-bg);
    border: 1px solid var(--rot-card-border);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }

  @media (min-width: 768px) {
    .rot-card { padding: 3rem; }
  }

  .rot-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .rot-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
  }

  @media (min-width: 768px) {
    .rot-row { grid-template-columns: 1fr auto 1fr; }
  }

  .rot-field {
    background: var(--rot-field-bg);
    border: 2px solid var(--rot-field-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.2s;
  }

  .rot-field:focus-within {
    border-color: var(--rot-field-hover);
  }

  .rot-field-result {
    background: var(--rot-result-bg);
    border-color: var(--rot-result-border);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.05);
  }

  .rot-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--rot-text-label);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
  }

  .rot-label-result {
    color: var(--rot-result-label);
  }

  .rot-input {
    width: 100%;
    text-align: center;
    font-size: 1.875rem;
    font-weight: 700;
    background: transparent;
    border: none;
    outline: none;
    color: var(--rot-text-main);
  }

  .rot-input::placeholder {
    color: var(--rot-text-hint);
  }

  .rot-input-purple:focus {
    color: var(--rot-purple);
  }

  .rot-input-result {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--rot-result);
    cursor: default;
  }

  .rot-input-result::placeholder {
    color: var(--rot-result-border);
  }

  input[type="number"]::-webkit-inner-spin-button,
  input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  input[type="number"] {
    -moz-appearance: textfield;
  }

  .rot-hint {
    font-size: 0.75rem;
    text-align: center;
    color: var(--rot-text-hint);
    margin-top: 0.5rem;
  }

  .rot-hint-result {
    color: rgba(37, 99, 235, 0.5);
  }

  .rot-result-row {
    position: relative;
    display: flex;
    align-items: center;
  }

  .rot-copy-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rot-result);
    opacity: 0.5;
    transition: opacity 0.15s;
  }

  .rot-copy-btn:hover {
    opacity: 1;
  }

  .rot-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--rot-sep-color);
    padding: 0.5rem 0;
  }

  .rot-sep-line {
    height: 1px;
    width: 1rem;
    background: currentcolor;
    display: none;
  }

  @media (min-width: 768px) {
    .rot-sep-line { display: block; }
  }

  .rot-sep-text {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
  }

  .rot-formula {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--rot-formula-bg);
    border-radius: 0.75rem;
    font-size: 0.9rem;
    color: var(--rot-formula-text);
    text-align: center;
    width: 100%;
  }

  .rot-formula-a {
    font-weight: 700;
    color: var(--rot-text-main);
  }

  .rot-formula-b {
    font-weight: 700;
    color: var(--rot-text-main);
  }

  .rot-formula-c {
    font-weight: 700;
    color: var(--rot-purple);
  }

  .rot-formula-x {
    font-weight: 700;
    color: var(--rot-result);
  }

  @keyframes rot-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }

  .rot-pop { animation: rot-pop 0.2s ease; }